training.cpp: In function 'void unite(int, int)':
training.cpp:27:13: error: reference to 'rank' is ambiguous
27 | if (rank[root_u] > rank[root_v]) {
| ^~~~
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/nested_exception.h:40,
from /usr/include/c++/10/exception:148,
from /usr/include/c++/10/ios:39,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from training.cpp:1:
/usr/include/c++/10/type_traits:1359:12: note: candidates are: 'template<class> struct std::rank'
1359 | struct rank
| ^~~~
training.cpp:14:21: note: 'std::vector<int> rank'
14 | vector<int> parent, rank;
| ^~~~
training.cpp:27:28: error: reference to 'rank' is ambiguous
27 | if (rank[root_u] > rank[root_v]) {
| ^~~~
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/nested_exception.h:40,
from /usr/include/c++/10/exception:148,
from /usr/include/c++/10/ios:39,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from training.cpp:1:
/usr/include/c++/10/type_traits:1359:12: note: candidates are: 'template<class> struct std::rank'
1359 | struct rank
| ^~~~
training.cpp:14:21: note: 'std::vector<int> rank'
14 | vector<int> parent, rank;
| ^~~~
training.cpp:29:20: error: reference to 'rank' is ambiguous
29 | } else if (rank[root_u] < rank[root_v]) {
| ^~~~
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/nested_exception.h:40,
from /usr/include/c++/10/exception:148,
from /usr/include/c++/10/ios:39,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from training.cpp:1:
/usr/include/c++/10/type_traits:1359:12: note: candidates are: 'template<class> struct std::rank'
1359 | struct rank
| ^~~~
training.cpp:14:21: note: 'std::vector<int> rank'
14 | vector<int> parent, rank;
| ^~~~
training.cpp:29:35: error: reference to 'rank' is ambiguous
29 | } else if (rank[root_u] < rank[root_v]) {
| ^~~~
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/nested_exception.h:40,
from /usr/include/c++/10/exception:148,
from /usr/include/c++/10/ios:39,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from training.cpp:1:
/usr/include/c++/10/type_traits:1359:12: note: candidates are: 'template<class> struct std::rank'
1359 | struct rank
| ^~~~
training.cpp:14:21: note: 'std::vector<int> rank'
14 | vector<int> parent, rank;
| ^~~~
training.cpp:33:13: error: reference to 'rank' is ambiguous
33 | rank[root_u]++;
| ^~~~
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/nested_exception.h:40,
from /usr/include/c++/10/exception:148,
from /usr/include/c++/10/ios:39,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from training.cpp:1:
/usr/include/c++/10/type_traits:1359:12: note: candidates are: 'template<class> struct std::rank'
1359 | struct rank
| ^~~~
training.cpp:14:21: note: 'std::vector<int> rank'
14 | vector<int> parent, rank;
| ^~~~
training.cpp: In function 'bool has_even_cycle(int)':
training.cpp:40:5: error: reference to 'rank' is ambiguous
40 | rank.resize(n + 1, 0);
| ^~~~
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/nested_exception.h:40,
from /usr/include/c++/10/exception:148,
from /usr/include/c++/10/ios:39,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from training.cpp:1:
/usr/include/c++/10/type_traits:1359:12: note: candidates are: 'template<class> struct std::rank'
1359 | struct rank
| ^~~~
training.cpp:14:21: note: 'std::vector<int> rank'
14 | vector<int> parent, rank;
| ^~~~