RT,
void pushdown(int p,int l,int r){
int len=r-l+1;
tag[lson]+=tag[p];
tag[rson]+=tag[p];
tree[lson]+=tag[p]*(len-(len/2));
tree[rson]+=tag[p]*(len/2);
tag[p]=0;
}
#define len r-l+1
void pushdown(int p,int l,int r){
tag[lson]+=tag[p];
tag[rson]+=tag[p];
tree[lson]+=tag[p]*(len-(len/2));
tree[rson]+=tag[p]*(len/2);
tag[p]=0;
}
这两个程序有什么区别吗?