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_39094867_5686.cpp: In function 'void init(int)':
0_0_39094867_5686.cpp:5:17: error: 'par' was not declared in this scope
    5 |                 par[i] = i;
      |                 ^~~
0_0_39094867_5686.cpp:6:17: error: 'rank' was not declared in this scope
    6 |                 rank[i] = 0;
      |                 ^~~~
0_0_39094867_5686.cpp: In function 'int find(int)':
0_0_39094867_5686.cpp:12:12: error: 'par' was not declared in this scope
   12 |         if(par[x] == x)
      |            ^~~
0_0_39094867_5686.cpp: In function 'void unite(int, int)':
0_0_39094867_5686.cpp:23:12: error: 'rank' was not declared in this scope
   23 |         if(rank[x] < rank[y])   par[x] = y;
      |            ^~~~
0_0_39094867_5686.cpp:23:33: error: 'par' was not declared in this scope
   23 |         if(rank[x] < rank[y])   par[x] = y;
      |                                 ^~~
0_0_39094867_5686.cpp:24:49: error: 'par' was not declared in this scope
   24 |         else                                    par[y] = x;
      |                                                 ^~~
0_0_39094867_5686.cpp:25:12: error: 'rank' was not declared in this scope
   25 |         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-05-04 03:53:39, Gzip enabled