02 2014 档案

摘要:#define lson l,m,n>1; build(lson); build(rson); pushUp(n);}//update only one pointvoid update(int x,int v,int l,int r,int n){ if(l==r) { //oprate here return; } int m=(l+r)>>1; if(x>1; if(L>1)); sum[n>1); add[n]=0; }}//update [L,R]void update... 阅读全文
posted @ 2014-02-10 16:06 Unisolate 阅读(205) 评论(0) 推荐(0)
摘要://memset c 0 before useint c[MAXN];//n -> update place//v -> update valuevoid update(int n,int v){ for(;n0;n-=(n&-n)) sum+=c[n]; return sum;}//if need oprate different array, use int* array/////////////////////////////////////////////int c[MAXX][MAXY];//update at (x,y)void update2D(int ... 阅读全文
posted @ 2014-02-09 14:39 Unisolate 阅读(170) 评论(0) 推荐(0)