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;
^
|