0_0_33338998_23063.cpp:3:11: error: 'N' was not declared in this scope
int s[N],ls[N],rs[N],cnt=0;
^
0_0_33338998_23063.cpp:3:17: error: 'N' was not declared in this scope
int s[N],ls[N],rs[N],cnt=0;
^
0_0_33338998_23063.cpp:3:23: error: 'N' was not declared in this scope
int s[N],ls[N],rs[N],cnt=0;
^
0_0_33338998_23063.cpp: In function 'void seg::newnode(int&)':
0_0_33338998_23063.cpp:5:36: error: 's' was not declared in this scope
void newnode(int &rt){rt=++cnt,s[rt]=ls[rt]=rs[rt]=0;}
^
0_0_33338998_23063.cpp:5:42: error: 'ls' was not declared in this scope
void newnode(int &rt){rt=++cnt,s[rt]=ls[rt]=rs[rt]=0;}
^
0_0_33338998_23063.cpp:5:49: error: 'rs' was not declared in this scope
void newnode(int &rt){rt=++cnt,s[rt]=ls[rt]=rs[rt]=0;}
^
0_0_33338998_23063.cpp: In function 'void seg::update(int&, int, int, int, int)':
0_0_33338998_23063.cpp:8:29: error: 's' was not declared in this scope
if(!rt)newnode(rt); s[rt]+=num; if(l==r)return;
^
0_0_33338998_23063.cpp:9:17: error: 'mid' was not declared in this scope
if(val<=mid)
^
0_0_33338998_23063.cpp:11:20: error: 'ls' was not declared in this scope
update(ls[rt],l,mid,val,num);
^
0_0_33338998_23063.cpp:15:20: error: 'rs' was not declared in this scope
update(rs[rt],mid+1,r,val,num);
^
0_0_33338998_23063.cpp: In function 'int seg::query(int&, int, int, int)':
0_0_33338998_23063.cpp:20:41: error: 's' was not declared in this scope
if(!rt)return 0; if(l==r)return s[rt];
^
0_0_33338998_23063.cpp:21:21: error: 'mid' was not declared in this scope
return val<=mid?query(ls[rt],l,mid,val):query(rs[rt],mid+1,r,val);
^
0_0_33338998_23063.cpp:21:31: error: 'ls' was not declared in this scope
return val<=mid?query(ls[rt],l,mid,val):query(rs[rt],mid+1,r,val);
^
0_0_33338998_23063.cpp:21:55: error: 'rs' was not declared in this scope
return val<=mid?query(ls[rt],l,mid,val):query(rs[rt],mid+1,r,val);
^
|