0_0_21448626_18121.cpp:13:8: error: 'node' was not declared in this scope
vector<node> tree[maxn];
^
0_0_21448626_18121.cpp:13:12: error: template argument 1 is invalid
vector<node> tree[maxn];
^
0_0_21448626_18121.cpp:13:12: error: template argument 2 is invalid
0_0_21448626_18121.cpp:13:24: error: invalid type in declaration before ';' token
vector<node> tree[maxn];
^
0_0_21448626_18121.cpp: In function 'int dfs(int, int)':
0_0_21448626_18121.cpp:16:33: error: request for member 'size' in 'tree[u]', which is of non-class type 'int'
for (int i = 0; i < tree[u].size(); i++) {
^
0_0_21448626_18121.cpp:17:26: error: invalid types 'int[int]' for array subscript
int v = tree[u][i].to;
^
0_0_21448626_18121.cpp:20:46: error: invalid types 'int[int]' for array subscript
ans += ((k<sz[v])? k:sz[v])*tree[u][i].val;
^
0_0_21448626_18121.cpp: In function 'void init()':
0_0_21448626_18121.cpp:25:44: error: request for member 'clear' in 'tree[i]', which is of non-class type 'int'
for (int i = 0; i < maxn; i++) tree[i].clear();
^
0_0_21448626_18121.cpp: In function 'int main(int, const char**)':
0_0_21448626_18121.cpp:35:13: error: 'node' was not declared in this scope
node t; t.fa = a;t.val = c; t.to = b;
^
0_0_21448626_18121.cpp:35:21: error: 't' was not declared in this scope
node t; t.fa = a;t.val = c; t.to = b;
^
0_0_21448626_18121.cpp:36:17: error: expected unqualified-id before '[' token
edge[i].push_back(t);
^
0_0_21448626_18121.cpp:38:17: error: expected unqualified-id before '[' token
edge[i].push_back(t);
^
|