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_24547188_3475.cpp:14:38: error: expected ';' at end of member declaration
     TreeNode(int _l = -1, int _r = -1) l(_l), r(_r) {}
                                      ^
0_0_24547188_3475.cpp:14:42: error: '_l' has not been declared
     TreeNode(int _l = -1, int _r = -1) l(_l), r(_r) {}
                                          ^
0_0_24547188_3475.cpp:14:45: error: 'int TreeNode::l(int)' conflicts with a previous declaration
     TreeNode(int _l = -1, int _r = -1) l(_l), r(_r) {}
                                             ^
0_0_24547188_3475.cpp:13:9: note: previous declaration 'int TreeNode::l'
     int l, r, val;
         ^
0_0_24547188_3475.cpp:14:49: error: '_r' has not been declared
     TreeNode(int _l = -1, int _r = -1) l(_l), r(_r) {}
                                                 ^
0_0_24547188_3475.cpp:14:54: error: 'int TreeNode::r(int)' conflicts with a previous declaration
     TreeNode(int _l = -1, int _r = -1) l(_l), r(_r) {}
                                                      ^
0_0_24547188_3475.cpp:13:12: note: previous declaration 'int TreeNode::r'
     int l, r, val;
            ^
0_0_24547188_3475.cpp: In function 'void buildTree(int)':
0_0_24547188_3475.cpp:24:46: error: invalid use of member (did you forget the '&' ?)
             if (pla[root] == 0) tree[root].l = node[root].child[i];
                                              ^
0_0_24547188_3475.cpp:25:36: error: invalid use of member (did you forget the '&' ?)
             else tree[pla[root]].r = node[root].child[i];
                                    ^
0_0_24547188_3475.cpp: In function 'int dp(int, int)':
0_0_24547188_3475.cpp:35:31: error: cannot convert 'TreeNode::r' from type 'int (TreeNode::)(int)' to type 'int'
     int tmp = dp (tree[i].r, q);
                               ^
0_0_24547188_3475.cpp:37:41: error: cannot convert 'TreeNode::l' from type 'int (TreeNode::)(int)' to type 'int'
         tmp = max (tmp, dp (tree[i].l, k) + dp (tree[i].r, q - k - 1) + val[i]);
                                         ^
0_0_24547188_3475.cpp:37:69: error: cannot convert 'TreeNode::r' from type 'int (TreeNode::)(int)' to type 'int'
         tmp = max (tmp, dp (tree[i].l, k) + dp (tree[i].r, q - k - 1) + val[i]);
                                                                     ^
0_0_24547188_3475.cpp: In function 'int main()':
0_0_24547188_3475.cpp:44:32: error: expected ';' before ':' token
     memset(pla, 0, sizeof(pla)):
                                ^


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-09-29 05:52:38, Gzip enabled