For each query of type 2 I have to output the Rocket distance of Kth nearest hostel from Origin.
Here Test Case is
9 3
1 10 10
1 9 9
1 -8 -8
2
1 7 7
2
1 6 6
1 5 5
2
and Sample Output is :
200
162
98
After 1 st 2 nd Query, if I calculate Rocket Distance , the output must be among 200,182,or 128 but How come the shortest distance be 200…?
Please Explain ?