Bad Testcases in April Cookoff

Codechef really needs to improve their testing.
In the April Cook-Off, in Div2 problem D, i.e Sorted Distances, the constraints mentioned are
1<Q<2 * 10^5, with each query having range of L,R going from 1 to N.

After the contest, I made a linear solution in each query, that is traversed from L to R in every query. Link to submission : Solution: 61922707 | CodeChef

This should totally not be acceptable. The constraints of the problem are given for a reason. This is so frequent on Codechef, where people who don’t understand the solution would time out end up coding it and getting AC. This solution should CLEARLY TIMEOUT. Hence I didn’t bother coding it during the contest. This isn’t the first time it’s happening to me on Codechef. Every other contest there comes a problem where the test cases are weak, and I’m left thinking about an optimized solution because I know that Brute Force will timeout.

This is ridiculously frustrating, knowing that I could’ve got a much better rank in the contest had I WASTED MY TIME CODING THE BRUTE FORCE WHICH I KNOW WILL TIMEOUT.

Maybe I just not give Codechef Contests anymore, and give contests on other platforms, where constraints are written because they are actually followed.

2 Likes