segment tree.