树状数组实现好了之后,改用线段树也实现了一下,接下来再用各种树实现,继续学习!!View Code #include<cstdio>#include<cstring>const int maxn = 222222;#define mid (l+r)>>1#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1int sum[maxn<<2];//记录有几个点的范围在节点的范围内int a[maxn],p[maxn];int n;/*void pushup(int rt){ sum[r Read More
posted @ 2011-12-26 08:33 Because Of You Views(1989) Comments(0) Diggs(0) Edit