I tried attempting CSES Prefix Sum Queries using lazy segment tree.
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
Auto comment: topic has been updated by KIMJONGOOF (previous revision, new revision, compare).
I didn't get your seg tree implementation, but here's my code if it helps. Even I used segment tree.
The Second solution given here is what I am trying to implement. I get what you have done, I just dont understand why my code fails! I have done everything exactly as done in the USACO solution..