Hi all,
I am trying to solve a problem on SPOJ.
This is a problem about kd trees i think, but I havent been able to solve it. I searched forums and got a hint regarding how this can also be done using Fenwick trees, but I am still not able to get much insights.
N is large so algorithm does need to run in O(nlogn) or better. Can anyone please help me in this? Some lines on how this can be solved using BIT, or any suggestion you can share would be very helpful.
Thanks Anant
http://mirror.codeforces.com/blog/entry/45075?#comment-296137