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!