0_0_14045217_7049.cpp: In function 'void dfs1(int, int)':
0_0_14045217_7049.cpp:23:5: error: 'size' was not declared in this scope
size[u] = 1;
^
0_0_14045217_7049.cpp:26:23: error: 'vis' was not declared in this scope
if(v == fa || vis[v]) continue;
^
0_0_14045217_7049.cpp:29:9: error: 'mx' was not declared in this scope
mx[u] = max(mx[u], size[v]);
^
0_0_14045217_7049.cpp: In function 'void dfs2(int, int, int)':
0_0_14045217_7049.cpp:34:14: error: 'size' was not declared in this scope
int mm = size[r] - size[u]; mm = max(mm, mx[u]);
^
0_0_14045217_7049.cpp:34:46: error: 'mx' was not declared in this scope
int mm = size[r] - size[u]; mm = max(mm, mx[u]);
^
0_0_14045217_7049.cpp:38:23: error: 'vis' was not declared in this scope
if(v == fa || vis[v]) continue;
^
0_0_14045217_7049.cpp:39:18: error: too few arguments to function 'void dfs2(int, int, int)'
dfs2(v, u);
^
0_0_14045217_7049.cpp:33:6: note: declared here
void dfs2(int u, int fa, int r){
^
0_0_14045217_7049.cpp: In function 'void dfs3(int, int)':
0_0_14045217_7049.cpp:46:12: error: 'vis' was not declared in this scope
if(vis[v] || fa == v) continue;
^
0_0_14045217_7049.cpp:47:9: error: 'dep' was not declared in this scope
dep[v] = dep[u] + 1;
^
0_0_14045217_7049.cpp: In function 'void work(int, int, int, int)':
0_0_14045217_7049.cpp:54:5: error: 'q' was not declared in this scope
q.push(U);
^
0_0_14045217_7049.cpp:56:9: error: 'u' was not declared in this scope
u = q.front(); q.pop();
^
0_0_14045217_7049.cpp:57:34: error: 'add' was not declared in this scope
add_edge(u, rt); add(u, U);
^
0_0_14045217_7049.cpp:58:12: error: 'tr' was not declared in this scope
if(tr[tr1].size()-1 < dep[u]) tr[tr1].push_back(A[u]);
^
0_0_14045217_7049.cpp:58:31: error: 'dep' was not declared in this scope
if(tr[tr1].size()-1 < dep[u]) tr[tr1].push_back(A[u]);
^
0_0_14045217_7049.cpp:58:57: error: 'A' was not declared in this scope
if(tr[tr1].size()-1 < dep[u]) tr[tr1].push_back(A[u]);
^
0_0_14045217_7049.cpp:59:33: error: 'A' was not declared in this scope
else tr[tr1][dep[u]] += A[u];
^
0_0_14045217_7049.cpp:60:12: error: 'tr' was not declared in this scope
if(tr[tr2].size()-1 < dep[u]-1) tr[tr2].push_back(A[u]);
^
0_0_14045217_7049.cpp:60:31: error: 'dep' was not declared in this scope
if(tr[tr2].size()-1 < dep[u]-1) tr[tr2].push_back(A[u]);
^
0_0_14045217_7049.cpp:60:59: error: 'A' was not declared in this scope
if(tr[tr2].size()-1 < dep[u]-1) tr[tr2].push_back(A[u]);
^
0_0_14045217_7049.cpp:61:35: error: 'A' was not declared in this scope
else tr[tr1][dep[u]-1] += A[u];
^
0_0_14045217_7049.cpp:64:27: error: 'vis' was not declared in this scope
if(v == rt || vis[v]) continue;
^
0_0_14045217_7049.cpp:65:13: error: 'dep' was not declared in this scope
dep[v] = dep[u] + 1;
^
0_0_14045217_7049.cpp: In function 'void solve(int)':
0_0_14045217_7049.cpp:71:12: error: 'inf' was not declared in this scope
maxn = inf; root = u;
^
0_0_14045217_7049.cpp:73:15: error: too few arguments to function 'void dfs2(int, int, int)'
dfs2(u, -1);
^
0_0_14045217_7049.cpp:33:6: note: declared here
void dfs2(int u, int fa, int r){
^
0_0_14045217_7049.cpp:74:5: error: 'dep' was not declared in this scope
dep[root] = 1;
^
0_0_14045217_7049.cpp:76:20: error: 'tot' was not declared in this scope
int roottree = tot;
^
0_0_14045217_7049.cpp:78:5: error: 'tr' was not declared in this scope
tr[tot ++].push_back(A[root]);
^
0_0_14045217_7049.cpp:78:26: error: 'A' was not declared in this scope
tr[tot ++].push_back(A[root]);
^
0_0_14045217_7049.cpp:82:12: error: 'vis' was not declared in this scope
if(vis[v]) continue;
^
0_0_14045217_7049.cpp:83:21: error: 'subtree' was not declared in this scope
dep[v] = 2; subtree = tot;
^
0_0_14045217_7049.cpp: In function 'int main()':
0_0_14045217_7049.cpp:90:26: error: 'n' was not declared in this scope
while(scanf("%d%d", &n, &m) != EOF){
^
0_0_14045217_7049.cpp:90:30: error: 'm' was not declared in this scope
while(scanf("%d%d", &n, &m) != EOF){
^
0_0_14045217_7049.cpp:91:14: error: 'init' was not declared in this scope
init();
^
0_0_14045217_7049.cpp:93:26: error: 'A' was not declared in this scope
scanf("%d", &A[i]);
^
0_0_14045217_7049.cpp:96:28: error: 'u' was not declared in this scope
scanf("%d%d", &u, &v);
^
0_0_14045217_7049.cpp:96:32: error: 'v' was not declared in this scope
scanf("%d%d", &u, &v);
^
0_0_14045217_7049.cpp:101:29: error: 'op' was not declared in this scope
scanf("%s%d%d", op, &u, &v);
^
0_0_14045217_7049.cpp:101:34: error: 'u' was not declared in this scope
scanf("%s%d%d", op, &u, &v);
^
0_0_14045217_7049.cpp:101:38: error: 'v' was not declared in this scope
scanf("%s%d%d", op, &u, &v);
^
|