线段树

algorithm

树状数组

algorithm