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_28341884_187.cpp: In member function 'void Tree::sum(int)':
0_0_28341884_187.cpp:24:13: error: 'x' was not declared in this scope
   for(int i=x;i>0;i-=i&(-i))ans+=t[i];
             ^
0_0_28341884_187.cpp:25:10: error: return-statement with a value, in function returning 'void' [-fpermissive]
   return ans;
          ^
0_0_28341884_187.cpp: In function 'void getroot(int, int, int)':
0_0_28341884_187.cpp:30:26: error: 'f' was not declared in this scope
  int e=head[u];size[u]=1;f[u]=0;
                          ^
0_0_28341884_187.cpp:34:6: error: 'v' was not declared in this scope
   if(v!=ff && flag[v]==0){dfs(v,u);size[u]+=size[v];f[u]=max(f[u],size[v]);}
      ^
0_0_28341884_187.cpp:34:15: error: 'flag' was not declared in this scope
   if(v!=ff && flag[v]==0){dfs(v,u);size[u]+=size[v];f[u]=max(f[u],size[v]);}
               ^
0_0_28341884_187.cpp:34:34: error: 'dfs' was not declared in this scope
   if(v!=ff && flag[v]==0){dfs(v,u);size[u]+=size[v];f[u]=max(f[u],size[v]);}
                                  ^
0_0_28341884_187.cpp: At global scope:
0_0_28341884_187.cpp:37:2: error: 'f' does not name a type
  f[u]=max(f[u],sum-size[u]);
  ^
0_0_28341884_187.cpp:38:2: error: expected unqualified-id before 'if'
  if(f[u]<f[root])root=u;
  ^
0_0_28341884_187.cpp:39:2: error: expected unqualified-id before 'return'
  return;
  ^
0_0_28341884_187.cpp:40:1: error: expected declaration before '}' token
 }
 ^


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-07-01 18:48:18, Gzip enabled