Rosetta Problems
← hoj に戻る
All you need is Segment Tree.
https://hoj.hamako-ths.ed.jp/onlinejudge/problems/1663