discretization, segment_tree