### DO_NOT_MISS_IT's blog

By DO_NOT_MISS_IT, history, 7 weeks ago,

Here is my accepted code : https://codeforces.com/contest/1791/submission/192106557

But this code should give TLE if the input is like :

1

200000 200000

a1 , a2 , a3 …… a200000

1 2 200000 (Update index 2 to 200000 and all 200000 queries are like this)

• -11

 » 7 weeks ago, # |   0 Your submission will likely fail after retesting. Although the original test set was weak, a few good test cases which eliminate most of the $\mathcal{O}(nq)$ solutions have been added during the hacking phase.
•  » » 7 weeks ago, # ^ |   +8 My original solution was with segment tree + lazy and that got accepted. Later I tried this and was surprised when this brute force got passed. Yeah I will be happy if this fails in the system test, but this is a very common way to solve this problem and there should be a test case in the main test in which this code should fail.