Hey i was trying to solve King's Path on codeforces http://mirror.codeforces.com/problemset/problem/242/C but i am getting wrong answer on case 10; my code: http://mirror.codeforces.com/contest/242/submission/14186492
Can anyone point my mistake? Thanks.