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!
You can see an HLD + Lazy Seg implementation of mine here: https://pastebin.com/ZLPaytVD
If you're struggling with range updates, I recommend taking some time tackling straight-forward questions like this one https://cses.fi/problemset/task/1735 to really digest the logic behind the algorithm.
Also, this one https://cses.fi/problemset/task/2134 is about HLD without lazy prop and might also be helpful
OMG thank you very much bro! really helpful for me! If you have more problems on this topic, I'd appreciate it, and once again, thank you!
You're welcome.
If you're looking for more HLD questions, this thread was posted some weeks ago and can be helpful: https://mirror.codeforces.com/blog/entry/125339#comment-1201836
OH! thanks!! finally I practice very hard.