Spoj AMR11A WA help
Here is my code for Spoj AMR11A. I have also tried all test cases given here,and it's giving correct answer.But still I am getting WA on Spoj.Can please anyone figure out any mistake in my code.
Full text and comments »
Hints Required for this Problem
Can anybody please give me any hints for this Problem?
How to solve this problem of graphs??
Please give me any hint or solution for this problem.
Spoj HORRIBLE using Treap
I have solved Spoj HORRIBLE using Segment Tree.But i want to know that how can we solve it using treap.Plz can anyone tell me.