WA in CHFIMPRS

https://www.codechef.com/viewsolution/33335325
Could not think of anymore corner cases . Can someone please help me out .
It will be of great help!

Hy, you can look at the video editorial of this problem here.

2 Likes

Thank you so much for the reference . Did it all already , still cannot get it right .
Cannot find the corner case .:slightly_frowning_face:

1 Like

https://www.codechef.com/viewsolution/33336657
This is the updated code.

Solved the bug , the could not handle when n=1 and m=1.

1 Like

https://www.codechef.com/viewsolution/33313648

done same thing but shows WA . can you provide in which test case it is failing.
please help!!!

check for odd m case.