예제 #1
0
void update(int x , int y , int val)
{
    while (x <= max_x)
    {
        updatey(x , y , val);// this function should update array tree[x]
        x += (x & -x);
    }
}
void updatex(int x,int y,int val){
	while(x<=max_v){
		updatey(x,y,val);
		x+=(x & -x);
	}
}
예제 #3
0
파일: 2029.cpp 프로젝트: zsxwing/POJ
inline void update(int x,int y) {
    while(x<=w) {
        updatey(x,y);
        x+=(x&-x);
    }
}