Closed bethandtownes closed 6 years ago
The dual one supports updating over a range and reading at (the trivial sum of) a point, and regular segment tree supports updating a point and get the sum of a range. example: http://codeforces.com/contest/1023/submission/41701318 , used to fill ranges with a same value
This is simplified (and essential) version of "lazy-propagation" (see http://se7so.blogspot.com/2012/12/segment-trees-and-lazy-propagation.html etc). Also note that the word "dual" may not be popular, while "segment tree with lazy propagation" often means both of range-update and range-sum.
thanks!
Hi
I like your code very much! But I have trouble understanding the dual segment tree. Could you explain to me what it does?
Thanks!