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

Автор restart., 9 лет назад, По-английски

Can we solve spoj MULTQ3 using BIT? If yes then How?

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

»
9 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I think you can't do this problem with a BIT, because you have to do intervals update. But you can try with a segment tree with lazy propagation.

»
9 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Oh, I haven't thought using BIT. This problem I use Segment Tree.

If you haven't solve this problem with Segment Tree, you can go this link1 and link2 to know about Segment Tree

And this is my solution.

If you want to continue with thinking of using BIT, I will prevent you. Hope you can do this.