Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

Jorge_Slime's blog

By Jorge_Slime, history, 6 weeks ago, In English

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!

  • Vote: I like it
  • -10
  • Vote: I do not like it

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

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