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

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

I am finding it difficult to solve this problem based on segment tree range update using lazy propagation, from CSES problem set. Specifically, I am not able to calculate the answer to the second part of this problem which states that what is the value at position k?

Can anyone please help me in lazy propagation?

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

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

Just as how you do a range query on the segment tree, you can query a single point, by querying a range of length $$$1$$$.

There's a fun twist though.

Spoiler