Virtual_Contestant's blog

By Virtual_Contestant, history, 4 years ago, In English

Hello everyone, How do I do this question on CSES involving point updates using merge sort tree ONLY? https://cses.fi/problemset/task/1144

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

If you are using c++, then you can use gnu pbds. It makes things really easy.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yeah I just read a blog related to that, it is really great. But can we do without it?

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I don't know, but if the constraints are less like x, p <= 10^6 then we can use BIT. May be we can apply here using some compression technique.

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

there's an Editorial for CSES Range Queries section . you can also refer to my comment if you want to solve it using bit .