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_32280378_14046.cpp: In function 'void init(int)':
0_0_32280378_14046.cpp:5:3: error: 'par' was not declared in this scope
   par[i] = i;
   ^
0_0_32280378_14046.cpp:6:3: error: 'rank' was not declared in this scope
   rank[i] = 0; 
   ^
0_0_32280378_14046.cpp: In function 'int find(int)':
0_0_32280378_14046.cpp:12:5: error: 'par' was not declared in this scope
  if(par[x] == x) 
     ^
0_0_32280378_14046.cpp: In function 'void unite(int, int)':
0_0_32280378_14046.cpp:23:5: error: 'rank' was not declared in this scope
  if(rank[x] < rank[y]) par[x] = y;
     ^
0_0_32280378_14046.cpp:23:24: error: 'par' was not declared in this scope
  if(rank[x] < rank[y]) par[x] = y;
                        ^
0_0_32280378_14046.cpp:24:12: error: 'par' was not declared in this scope
  else      par[y] = x;
            ^
0_0_32280378_14046.cpp:25:5: error: 'rank' was not declared in this scope
  if(rank[x] == rank[y]) rank[x]++;
     ^


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-12-27 07:11:33, Gzip enabled