Error in code (CHEFZOT)

what’s the problem with this code
https://www.codechef.com/viewsolution/27949532

problem: CHEFZOT Problem - CodeChef

while someone used similar technique and got AC
https://www.codechef.com/viewsolution/27942938

Consider the testcase:

3  
0 1 1

oh. got it.

1 Like