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

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

Hi,
I wanted to know how to make segment tree with
Lazy propagation for Range Assignment Updates (make elements in range L to R equals to update_Val) and Range Sum Queries.
I am not able to code it properly and also I couldn't find any proper tutorial for this specific set of operations.

Can anyone share the code for doing that?

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

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится
»
6 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +6 Проголосовать: не нравится

i think this might work

https://ideone.com/ohH0nh