0_0_25991640_10238.cpp:24:28: error: expected identifier before '*' token
Node *new_node(Node *lf , *Node *ri, int s){
^
0_0_25991640_10238.cpp:24:34: error: expected ',' or '...' before '*' token
Node *new_node(Node *lf , *Node *ri, int s){
^
0_0_25991640_10238.cpp: In function 'ChairM::Node* ChairM::new_node(ChairM::Node*, int*)':
0_0_25991640_10238.cpp:25:9: error: 'o' was not declared in this scope
Node *o = &trnod[trsz++];
^
0_0_25991640_10238.cpp:26:21: error: 'ri' was not declared in this scope
o->lf= lf; o->ri =ri; o->s= s;
^
0_0_25991640_10238.cpp:26:31: error: 's' was not declared in this scope
o->lf= lf; o->ri =ri; o->s= s;
^
0_0_25991640_10238.cpp: In function 'ChairM::Node* ChairM::Add(ChairM::Node*, int, int, int)':
0_0_25991640_10238.cpp:31:30: error: 'none' was not declared in this scope
if ( L==R) return new_node(none, none, o->s+1);
^
0_0_25991640_10238.cpp:31:45: error: 'struct ChairM::Node' has no member named 's'
if ( L==R) return new_node(none, none, o->s+1);
^
0_0_25991640_10238.cpp:32:11: error: 'MID' was not declared in this scope
if ( y<=MID) return new_node(Add(o->lf, L, MID, y), o->ri, o->s+1);
^
0_0_25991640_10238.cpp:32:65: error: 'struct ChairM::Node' has no member named 's'
if ( y<=MID) return new_node(Add(o->lf, L, MID, y), o->ri, o->s+1);
^
0_0_25991640_10238.cpp:33:61: error: 'struct ChairM::Node' has no member named 's'
else return new_node(o->lf, Add(o->ri, MID+1, R, y), o->s+1);
^
0_0_25991640_10238.cpp: In function 'int ChairM::Sum(ChairM::Node*, int, int, int)':
0_0_25991640_10238.cpp:37:24: error: 'struct ChairM::Node' has no member named 's'
if ( L==R) return o->s;
^
0_0_25991640_10238.cpp:38:11: error: 'MID' was not declared in this scope
if ( x<=MID) return Sum(o->lf, L, MID, x); else
^
0_0_25991640_10238.cpp:39:44: error: 'struct ChairM::Node' has no member named 's'
return Sum(o->ri, MID+1, R, x) + o->lf->s;
^
0_0_25991640_10238.cpp: In function 'int LCA::lca(int, int)':
0_0_25991640_10238.cpp:45:8: error: 'd' was not declared in this scope
if ( d[u] < d[v]) swap(u, v);
^
0_0_25991640_10238.cpp:46:18: error: 'd' was not declared in this scope
for (int step= d[u]-d[v] ,i=0; (1<<i) <= step; ++i)
^
0_0_25991640_10238.cpp:46:38: error: 'i' was not declared in this scope
for (int step= d[u]-d[v] ,i=0; (1<<i) <= step; ++i)
^
0_0_25991640_10238.cpp: In function 'int LCA::Middle(int, int, int&, int&)':
0_0_25991640_10238.cpp:56:29: error: 'd' was not declared in this scope
int lc= lca(u,v); int l = d[u]+d[v] - d[lc]-d[lc], rev=0;
^
0_0_25991640_10238.cpp:57:31: error: 'rev' was not declared in this scope
if (d[u] < d[v]) swap(u,v), rev=1;
^
0_0_25991640_10238.cpp:61:8: error: 'rev' was not declared in this scope
if ( rev) swap(x, y);
^
0_0_25991640_10238.cpp: In function 'void dfs0(int, int)':
0_0_25991640_10238.cpp:73:10: error: too few arguments to function 'void dfs0(int, int)'
dfs0(v); sz[u] += sz[v];
^
0_0_25991640_10238.cpp:64:6: note: declared here
void dfs0(int u, int ff){
^
0_0_25991640_10238.cpp: In function 'void dfs1(int, int, int, PII*, int&, int*)':
0_0_25991640_10238.cpp:82:28: error: too few arguments to function 'void dfs1(int, int, int, PII*, int&, int*)'
dfs1(v, u, curd+1, vd, vn);
^
0_0_25991640_10238.cpp:77:6: note: declared here
void dfs1(int u, int fa, int curd, PII* vd, int &vn,int *siz){
^
0_0_25991640_10238.cpp: In function 'void Readin()':
0_0_25991640_10238.cpp:142:8: error: too few arguments to function 'void dfs0(int, int)'
dfs0(1);
^
0_0_25991640_10238.cpp:64:6: note: declared here
void dfs0(int u, int ff){
^
0_0_25991640_10238.cpp: In function 'int Build_Tree(int, PII*, int)':
0_0_25991640_10238.cpp:158:13: error: '_totdfn' was not declared in this scope
int *dfn = _totdfn[kth], *siz=_totsiz[kth];
^
0_0_25991640_10238.cpp:159:21: error: 'dfsorder' was not declared in this scope
vector<int> &ord = dfsorder[u];
^
0_0_25991640_10238.cpp:168:22: error: 'siz' was not declared in this scope
dfs1(v,u,1, vd, vn,siz); // pair< identi , depth > vdn
^
0_0_25991640_10238.cpp:187:9: error: 'Segment' was not declared in this scope
vector<Segment::*Node> &pre =Segment::_totpre[kth];
^
0_0_25991640_10238.cpp:187:23: error: template argument 1 is invalid
vector<Segment::*Node> &pre =Segment::_totpre[kth];
^
0_0_25991640_10238.cpp:187:23: error: template argument 2 is invalid
0_0_25991640_10238.cpp:187:30: error: invalid type in declaration before '=' token
vector<Segment::*Node> &pre =Segment::_totpre[kth];
^
0_0_25991640_10238.cpp:187:31: error: 'Segment' is not a class, namespace, or enumeration
vector<Segment::*Node> &pre =Segment::_totpre[kth];
^
0_0_25991640_10238.cpp:5:12: error: request for member 'push_back' in 'pre', which is of non-class type 'int'
#define PB push_back
^
0_0_25991640_10238.cpp:188:6: note: in expansion of macro 'PB'
pre.PB( Segment::none);
^
0_0_25991640_10238.cpp:188:10: error: 'Segment' is not a class, namespace, or enumeration
pre.PB( Segment::none);
^
0_0_25991640_10238.cpp:5:12: error: request for member 'push_back' in 'pre', which is of non-class type 'int'
#define PB push_back
^
0_0_25991640_10238.cpp:190:7: note: in expansion of macro 'PB'
pre.PB(Segment::Add(pre.back(), 1, n, ord[i]));
^
0_0_25991640_10238.cpp:190:10: error: 'Segment' is not a class, namespace, or enumeration
pre.PB(Segment::Add(pre.back(), 1, n, ord[i]));
^
0_0_25991640_10238.cpp:190:27: error: request for member 'back' in 'pre', which is of non-class type 'int'
pre.PB(Segment::Add(pre.back(), 1, n, ord[i]));
^
|