有一个一开始均为 000 的数列。
一开始有若干次区间 +1+1+1 或区间 −1-1−1
然后有若干次查询,每次查询区间和的历史最大值。
期望得到比 O(nnlogn)O(n\sqrt{n}\log{n})O(nnlogn) 更优的做法