looking for Segment Tree template for Range Assignment and Ranqe Maximum Query

Revision en3, by simp_pro, 2023-04-16 22:23:30

By range assignment, I mean setting all values in a range to x

I have been looking for this template but could not find anywhere. The best I have got is when updates is not decreasing the value.

I also tried modifying the lazy segment tree but could not get desired result

Can you share your template

Tags template, segment tree

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English simp_pro 2023-04-16 22:23:30 66
en2 English simp_pro 2023-04-16 21:08:55 82
en1 English simp_pro 2023-04-16 21:06:22 240 Initial revision (published)