Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
WA或者PE的注意!if(tree[index].lazy) { tree[index*2].lazy+=tree[index].lazy; tree[index*2+1].lazy+=tree[index].lazy; tree[index*2].val+=(r-l+1-(r-l+1)/2)*tree[index].lazy; tree[index*2+1].val+=(r-l+1)/2*tree[index].lazy; tree[index].lazy=0; } if(left<=l&&r<=right) { tree[index].lazy+=val; tree[index].val+=(r-l+1)*val; return ; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator