How to implement "HLD + Segment Tree with Lazy Propagation"?

Revision en1, by Jorge_Slime, 2024-11-04 00:05:30

I tried to solve this problem: https://vjudge.net/problem/UVA-13139
and here is my implementation: https://paste.myst.rs/cc9vzvcn

Honestly, I don’t struggle with implementing a standard segment tree, but when it comes to range updates, it gets challenging. If anyone could help me or provide some problems, implementations, or resources to identify my error, I would greatly appreciate it. Thanks in advance!

Tags #trees, #graphs, #segment tree update

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Jorge_Slime 2024-11-04 00:05:30 476 Initial revision (published)