F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

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);
                 ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-17 08:44:20, Gzip enabled