Блог пользователя ka89

Автор ka89, история, 8 лет назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится