I am solving NATALIAG using gridwalk but I keep getting a WA even though my code works on all the testcases I tried out. I used spojtoolkit.com but some testcases were obviously wrong so I am hesitant to trust it yet whatever correct testacase I could find gave the right answer.
Anyway , here is my code
[removed my code]
So can anyone point out my mistake(s) so that I can finally get an AC.
Well , thanks anyway , for helping out.
Edit 1 : Got an AC thanks (again) to @simes and hence removed my code.