Please Help me get the logical mistake here:
https://www.codechef.com/viewsolution/35467428
I am first making an array of pairs<x coordinate,id of frog> and sort it accn to first parameter.
After that i amking a dp array , index of which is frog id and value is the id of leftmost frog which it can communicate to.
Now for each query i iteratively checks whether the value of the dp array at index of sender frog id matches with recipent frog id and breaks when -1 is encountered.