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_25836218_1088.cpp:7:27: error: expected initializer before 'size'
 int id[100005],fa[1000005]size[1000005];
                           ^
0_0_25836218_1088.cpp: In function 'int find(int)':
0_0_25836218_1088.cpp:9:9: error: 'fa' was not declared in this scope
  return fa[x]==x?x:fa[x]=find(fa[x]);
         ^
0_0_25836218_1088.cpp: In function 'int main()':
0_0_25836218_1088.cpp:17:15: error: 'size' was not declared in this scope
   rep(q,0,n-1)size[q]=1,fa[q]=q,id[q]=q;
               ^
0_0_25836218_1088.cpp:17:25: error: 'fa' was not declared in this scope
   rep(q,0,n-1)size[q]=1,fa[q]=q,id[q]=q;
                         ^
0_0_25836218_1088.cpp:24:5: error: 'size' was not declared in this scope
     size[x]+=size[y];
     ^
0_0_25836218_1088.cpp:26:5: error: 'fa' was not declared in this scope
     fa[y]=x;
     ^
0_0_25836218_1088.cpp:29:7: error: 'size' was not declared in this scope
     --size[find(a)];
       ^
0_0_25836218_1088.cpp:32:5: error: 'fa' was not declared in this scope
     fa[id[a]]=id[a];
     ^
0_0_25836218_1088.cpp:36:20: error: 'size' was not declared in this scope
   rep(q,0,n-1)ans+=size[q]!=0;
                    ^


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:40:43, Gzip enabled