ACM-ICPC Kharagpur KTHPATH wrong answer

My solution for KTHPATH problem gives wrong answer. But I am unable to find a test case where it doesn’t work. Can someone please give a test case where this fails?

link to problem : http://www.codechef.com/ACMKGP13/problems/KTHPATH
link to solution : http://www.codechef.com/viewsolution/2917786

n is 10^5
Q can be 10^10

1 Like

thanks a lot.
i actually facepalmed after reading your comment :smiley:

thanks a lot.
i actually facepalmed after reading your comment :smiley:

1 Like