0_0_19776282_7796.cpp:14:8: error: 'N' was not declared in this scope
} tree[N << 2];
^
0_0_19776282_7796.cpp:16:7: error: 'N' was not declared in this scope
int a[N];
^
0_0_19776282_7796.cpp: In function 'void PushUp(int)':
0_0_19776282_7796.cpp:20:14: error: 'tree' was not declared in this scope
int ll = tree[rt<<1].r - tree[rt<<1].l + 1;//求左子树的线段长度
^
0_0_19776282_7796.cpp: In function 'void PushDown(int)':
0_0_19776282_7796.cpp:43:8: error: 'tree' was not declared in this scope
if(tree[rt].ck == 1)//如果ck=1表示这里需要翻转,翻转其实就是把左右子树的0,1的lsum,rsum,msum交换
^
0_0_19776282_7796.cpp: In function 'void build(int, int, int)':
0_0_19776282_7796.cpp:60:5: error: 'tree' was not declared in this scope
tree[rt].l = l;
^
0_0_19776282_7796.cpp:65:12: error: 'a' was not declared in this scope
if(a[l] == 1)//black
^
0_0_19776282_7796.cpp: In function 'void update(int, int, int)':
0_0_19776282_7796.cpp:85:8: error: 'tree' was not declared in this scope
if(tree[rt].l == l && tree[rt].r == r)//刚好是需要更新区间[l,r],直接更新
^
0_0_19776282_7796.cpp:94:13: error: 'tree' was not declared in this scope
int m = tree[rt].mid();
^
0_0_19776282_7796.cpp: In function 'int query(int, int, int)':
0_0_19776282_7796.cpp:107:8: error: 'tree' was not declared in this scope
if(tree[rt].l == l && tree[rt].r == r)//刚好到查询区间
^
0_0_19776282_7796.cpp:112:13: error: 'tree' was not declared in this scope
int m = tree[rt].mid();
^
0_0_19776282_7796.cpp: In function 'int main()':
0_0_19776282_7796.cpp:134:51: error: 'a' was not declared in this scope
for(int i = 1; i <= n ; i ++) scanf("%d",&a[i]);
^
|