WA for LEMOUSE

http://www.codechef.com/viewsolution/2276396. Can any body plz tell me why its giving WA.

Your code fails for

4 5
10000
11111
01000
01001

Answer should be 6.

1 Like

@nims11 : thanx alot. a silly mistake cost me a lot of WA. Changing 1 line gt accepted. $m next time i will try to be careful.

Plz ans my ques some one.

Plz ans my ques some one.

I recommend you that in such cases, write a test generator + brute solution.