Weak judge data in SnackDown 2019 - Online Round 1A (problem : Chef and Periodic Sequence)

My code got partially accepted despite there were some bugs.

partailly accepted buggy code : https://www.codechef.com/viewsolution/21051381

fully accepted code : https://www.codechef.com/viewsolution/21110233

WA cases :

5

5 1 -1 3 1

Output should be impossible, but my partially accepted code outputs 3.

16

1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 1

Output should be 3, but my partially accepted code outputs 6.

Both of the cases give right answers in the AC code.

Are you sure about your code’s output? Because I just ran your partially accepted buggy code in codechef ide and answers were impossible and 3 for the above 2 test cases respectively.

That was a wrong link, I have edited, and yes…it gives wrong output for sure. Please check it again…