0_0_39836266_4361.cpp: In function 'void merge(int, int)':
0_0_39836266_4361.cpp:27:13: error: reference to 'rank' is ambiguous
27 | if (rank[rootx] > rank[rooty]) {
| ^~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/move.h:57,
from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/exception_ptr.h:41,
from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/exception:164,
from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ios:41,
from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ostream:40,
from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iostream:41,
from 0_0_39836266_4361.cpp:1:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/type_traits:1356:12: note: candidates are: 'template<class> struct std::rank'
1356 | struct rank
| ^~~~
0_0_39836266_4361.cpp:11:5: note: 'int rank [1005]'
11 | int rank[1005]; // 用于按秩合并
| ^~~~
0_0_39836266_4361.cpp:27:27: error: reference to 'rank' is ambiguous
27 | if (rank[rootx] > rank[rooty]) {
| ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/type_traits:1356:12: note: candidates are: 'template<class> struct std::rank'
1356 | struct rank
| ^~~~
0_0_39836266_4361.cpp:11:5: note: 'int rank [1005]'
11 | int rank[1005]; // 用于按秩合并
| ^~~~
0_0_39836266_4361.cpp:29:20: error: reference to 'rank' is ambiguous
29 | } else if (rank[rootx] < rank[rooty]) {
| ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/type_traits:1356:12: note: candidates are: 'template<class> struct std::rank'
1356 | struct rank
| ^~~~
0_0_39836266_4361.cpp:11:5: note: 'int rank [1005]'
11 | int rank[1005]; // 用于按秩合并
| ^~~~
0_0_39836266_4361.cpp:29:34: error: reference to 'rank' is ambiguous
29 | } else if (rank[rootx] < rank[rooty]) {
| ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/type_traits:1356:12: note: candidates are: 'template<class> struct std::rank'
1356 | struct rank
| ^~~~
0_0_39836266_4361.cpp:11:5: note: 'int rank [1005]'
11 | int rank[1005]; // 用于按秩合并
| ^~~~
0_0_39836266_4361.cpp:33:13: error: reference to 'rank' is ambiguous
33 | rank[rootx]++; // 如果两个根的秩相同,合并后根的秩加1
| ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/type_traits:1356:12: note: candidates are: 'template<class> struct std::rank'
1356 | struct rank
| ^~~~
0_0_39836266_4361.cpp:11:5: note: 'int rank [1005]'
11 | int rank[1005]; // 用于按秩合并
| ^~~~
0_0_39836266_4361.cpp: In function 'void result()':
0_0_39836266_4361.cpp:58:21: error: reference to 'rank' is ambiguous
58 | rank[j] = 0; // 初始化秩
| ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/type_traits:1356:12: note: candidates are: 'template<class> struct std::rank'
1356 | struct rank
| ^~~~
0_0_39836266_4361.cpp:11:5: note: 'int rank [1005]'
11 | int rank[1005]; // 用于按秩合并
| ^~~~
|