segmenttree+balancedtree