why this code worked?

Why https://www.codechef.com/viewsolution/22580920 solution passed for this question https://www.codechef.com/COCS2019/problems/ANWCC02/? How can test cases be so weak?
@humble_rookie

1 Like

Because they may not check brute one or time multiplier for java may be another point.

I get it.But How can they be so careless if that’s the case :frowning:

https://www.codechef.com/viewsolution/22583870 check this out!! this is brute force too and worked and it is C++, so there test case were weak.

1 Like

I agree with you

1 Like

Nice, he even did not take random r :slight_smile:
So weak tests)
I’ve wondered why there were so many AC during contest.
I suspected that it is for weak tests.

The problem was a standard FFT, that might have had been the reason for so many AC’s … though I could not solve it :wink: