Is question me krna kya hai kuch samajh hi nhi aa rha
Hostel Visit -- can't able to understand this problem
dekho humesha x and y aa rahe hai
toh tumhe har 2 wali query pr kth maximum dis(x,y) batana hai
where
dis(x,y)=xx+yy
ye jo inhone test case diya hai ye test case samjha do ki kaise operate hua hai aur kaise aaya ye output plz.
9 3
1 10 10
1 9 9
1 -8 -8
2
1 7 7
2
1 6 6
1 5 5
2
9 queries hai or 1 wali query me insert krna hai bucket me or 2 wali query me batana hai ki 3rd largest element kaunsa hai bucket me abhi tak
th shuru krte hai
initialy bucket empty hai
fir aata hai 1 10 10
bucket me daal denge (1010)+(1010)=200;
ab bucket hai {100};
fir 1 9 9 aayega
th bucket ho jayegi ={200,162}
ab aayega 1 -8 -8
fir vuket me dalenge (-8*-8)+(-8*-8)=128
th bucket ho jayegi after 3 queries ={200,162,128}
ab ayegi query 2 wali
th hume batana hai ki 3rd largest kaunsa hai
th bucket me 3rd largest kaunsa hai ???
200 wala , th print hoga 200.
ese hi baaki queries krde