Hostel Visit,question doubt?

I have got the way that it is to be implemented,i havee even got my testcases correct but i am still confused at what question is trying to ask. Look it is asking for K nearest hostels from origin,so firectly shouldnot they beones at the points (5,5) , (6,6) and (7,7).

even if i look at the question being k nearest to each other while he viists, then also for the first etstcase the nearest would be with (-8,-8) , how come for first type 2 query (10,10) will be the justified answer…

@Vibhuti0206
hello Vibhuti,
image

distance of (10,10) -> 200
distance of (9,9) -> 162
distance of(-8,-8) -> 128
now query is to find 3rd nearest.
1st nearest is (-8,-8) at distance of 128
2nd nearest is (9,9) at distance of 162
3rd nearest is (10,10) at distance of 200
thats why answer for first query is (10,10) and not (-8,-8)

But why are finding 3rd nearest now? could ypu please expain the questiona nd what exactly is to be done?

i have replied to ur chat pls check