Comments
On 300iqCodeforces Round #504, 8 years ago
0

Segment tree is more complicated to code than O(N + Q)

On 300iqCodeforces Round #504, 8 years ago
0

Don't use a segment tree then

On 300iqCodeforces Round #504, 8 years ago
+1

The complexity should be O(N + Q)