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 : CodeChef: Practical coding for everyone
link to solution : CodeChef: Practical coding for everyone

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