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_36509952_21136.cpp:7:1: error: expected ',' or ';' before 'int'
 int pre[N]; 
 ^
0_0_36509952_21136.cpp: In function 'void init(int)':
0_0_36509952_21136.cpp:11:25: error: 'pre' was not declared in this scope
  for(int i=0;i<=tn;i++) pre[i]=i;
                         ^
0_0_36509952_21136.cpp: In function 'int find(int)':
0_0_36509952_21136.cpp:15:9: error: 'pre' was not declared in this scope
  return pre[x]==x?x:pre[x]=find(pre[x]);
         ^
0_0_36509952_21136.cpp: In function 'void join(int, int)':
0_0_36509952_21136.cpp:20:13: error: 'pre' was not declared in this scope
  if(fx!=fy) pre[fx]=fy;
             ^
0_0_36509952_21136.cpp: In function 'int main()':
0_0_36509952_21136.cpp:33:8: error: 'pre' was not declared in this scope
     if(pre[j]==j) cnt++;
        ^


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 06:46:49, Gzip enabled