个人记录线段树性质 1.二叉树,每个点有0/2个点。 2.每个点代表一个区间 3.跟的区间是【1,n】; [l,r]:mid=l+r/2,左儿子是[l,mid],右儿子是[mid+1,r]; 4.线段树高为 O(log_2n) log_ab=log_cb/log_ca 代码