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_13615572_1421.cpp:14:11: error: 'maxv' was not declared in this scope
     int d[maxv];
           ^
0_0_13615572_1421.cpp: In constructor 'disjSet::disjSet(int)':
0_0_13615572_1421.cpp:16:42: error: 'd' was not declared in this scope
     disjSet(int n){for(int i=1;i<=n;++i) d[i]=-1;}
                                          ^
0_0_13615572_1421.cpp: In member function 'int disjSet::findSet(int)':
0_0_13615572_1421.cpp:18:12: error: 'd' was not declared in this scope
         if(d[x]<0) {return x;}
            ^
0_0_13615572_1421.cpp:19:16: error: 'd' was not declared in this scope
         return d[x]=findSet(d[x]); //路径压缩
                ^
0_0_13615572_1421.cpp: In member function 'void disjSet::unionSet(int, int)':
0_0_13615572_1421.cpp:25:12: error: 'd' was not declared in this scope
         if(d[root1]<d[root2]) d[root2]=root1;
            ^
0_0_13615572_1421.cpp: In function 'int main()':
0_0_13615572_1421.cpp:45:19: error: 'class disjSet' has no member named 'd'
             if(ds.d[i]<0) ++ans;
                   ^


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-06-29 14:28:50, Gzip enabled