weak test in encoder https://www.codechef.com/ENCO2018/

https://www.codechef.com/viewsolution/21215759
this solution should be incorrect because not considering diagonal case
but gives right answer.
weak test case

1 Like

I found the same thing. The test cases are checking for only CHECK position and not for CHECKMATE position ;

Only CHECK CHECKER got AC. The real solution should be this.

1 Like

Even in Second Largest Element problem,
https://www.codechef.com/viewsolution/21221677
This solution gives output as 1 for [3,3,3,3,3] and K=3.
Answer should be 0 I guess.