nzec error

Hi All,

I gave the same input as given next to the qs.
5
1 2 3 4 5
4
1 2 3
2 3 4
1 1 1
1 5 1000000000
it worked fine on my system.
Should I include some checks like…

1 ≤ N ≤ 100,000
1 ≤ Ai ≤ 100
1 ≤ T ≤ 100,000
1 ≤ Li ≤ Ri ≤ N
1 ≤ Mi ≤ 109

Thanks and Regards,
Anju

No, you need not.

All test data given in codechef WILL CONFORM to the constraints given in the problem. So, you can write code without checking whether the data falls within the specified range/constraints.

Happy Coding! :slight_smile:

1 Like

This just means that all input given will be VALID, as per the constraints.

Your solution might not get accepted, if there are other problems in the code, and it gives Wrong-Answer or Time-Limit-Exceeded or Runtime-Error or Compilation-Error.

First, You need not to check the constraints.

Second, check your program at online IDE like ideone. It is using the same resources that codechef use. And remember run your program as User(not private) because i guess this is the ongoing competiton problem you are trying to solve.

If then you are not getting any error then run it over corner cases. And try to debug your program on your on until competition finishes.

PS: If you are a new user then first start with practice problems like TEST.

1 Like

ok…i think the problem is that I used Scanner.
Thank you!!