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

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

Hey, some problems that requires cumulative frequencies asks for range update and range queries.

This problem in it's simplest form can be solved using segment tree with lazy propagation.

It can also be solved using binary indexed tree, but using it here differs from using it with range update and point query, or point update and range query.

Now I read couple of articales about it, but they all give a breef explanation about direct solution only, that two BITs needed.

I still can't understand why this problem occers and how was this solution invented.

Can someone please explain this topic.

Thanks :D

Edit: This is a link to one of the explanations for this problem.

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

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

I don't know how helpful it will be, but check this out http://coutcode.com/blog/binaryindexedtree/

Edit: Well, if I shared it, why not ask some feedback on the article? :)