Help needed for SPOJ problem GANNHAT

Правка en1, от ka89, 2016-08-02 18:29:36

Hi all,

I am trying to solve a problem on SPOJ.

GANNHAT 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

Теги data structures, fenwick tree

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский ka89 2016-08-02 18:29:36 583 Initial revision (published)