Segment tree with lazy add and set

Revision en1, by ns0, 2025-01-02 03:51:04

Hi, I know that we can make lazy modification and also lazy set (setting each element between [l, r] to x). But I wonder if we can do both, I mean there will be 3 queries and one is for modification, one is for setting and one is for getting sum/min/max. If yes, I wonder if we can do it with iterative way?

Tags segment tree, lazy propagation

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English ns0 2025-01-02 03:51:04 341 Initial revision (published)