Change SegmentTree to closed-interval