Блог пользователя Jorge_Slime

Автор Jorge_Slime, история, 2 месяца назад, По-английски

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!

  • Проголосовать: нравится
  • -10
  • Проголосовать: не нравится

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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