constructive, segment_tree