KIMJONGOOF's blog

By KIMJONGOOF, history, 2 hours ago, In English

I tried attempting CSES Prefix Sum Queries using lazy segment tree.

My Solution

Can someone explain to me exactly why my logic fails??

*Edit -> I realized that I was not changing the values in the original array and so I included that in the solution and it still fails -> Solution

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
114 minutes ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by KIMJONGOOF (previous revision, new revision, compare).

»
40 minutes ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I didn't get your seg tree implementation, but here's my code if it helps. Even I used segment tree.