Did you get time to check it?
well I did found that you havenāt printed āCase 1:ā thing before printing the answer⦠which is the same mistake I did⦠and ur code give 0 for second output in the given test case⦠so I ll look into it and get back to uā¦
one more thing to ask⦠have you cleared all arrays after each test case ??
because specially lazy tree should be initialized 0 for each test caseā¦
what I noticed was there is some error with inputs⦠the āvā for 3rd query is getting wrong⦠after that I would like to point out the way you called update functionā¦
update(1, 0, n - 1, s[v], e[v], x);
why it is 0 to n-1
I mean I am not saying that it is wrong but all other queries had input 1 to n and only this had 0 to n-1ā¦
so just check thatā¦
moreover take long instead of int cuz I saw some comments on que that many wrong submissions for overflowā¦
make arrays new before/after each test case⦠I mean make lazy tree 0
, clear the āLISTā
tell me after doing this much changesā¦