Borderou de evaluare (job #3230477)
Utilizator | Data | 21 mai 2024 18:32:33 | |
---|---|---|---|
Problema | Radiatie | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void unite(int, int)':
main.cpp:32:13: error: reference to 'rank' is ambiguous
32 | if (rank[rootU] > rank[rootV]) {
| ^~~~
In file included from /usr/include/c++/12.2.1/bits/move.h:57,
from /usr/include/c++/12.2.1/bits/exception_ptr.h:43,
from /usr/include/c++/12.2.1/exception:168,
from /usr/include/c++/12.2.1/ios:39,
from /usr/include/c++/12.2.1/ostream:38,
from /usr/include/c++/12.2.1/iostream:39,
from main.cpp:1:
/usr/include/c++/12.2.1/type_traits:1394:12: note: candidates are: 'template<class> struct std::rank'
1394 | struct rank
| ^~~~
main.cpp:19:21: note: 'std::vector<int> rank'
19 | vector<int> parent, rank;
| ^~~~
main.cpp:32:27: error: reference to 'rank' is ambiguous
32 | if (rank[rootU] > rank[rootV]) {
| ^~~~
/usr/include/c++/12.2.1/type_traits:1394:12: note: candidates are: 'template<class> struct std::rank'
1394 | struct rank
| ^~~~
main.cpp:19:21: note: 'std::vector<int> rank'
19 | vector<int> parent, rank;
| ^~~~
main.cpp:34:20: error: reference to 'rank' is ambiguous
34 | } else if (rank[rootU] < rank[rootV]) {
| ^~~~
/usr/include/c++/12.2.1/type_traits:1394:12: note: candidates are: 'template<class> struct std::rank'
1394 | struct rank
| ^~~~
main.cpp:19:21: note: 'std::vector<int> rank'
19 | vector<int> parent, rank;
| ^~~~
main.cpp:34:34: error: reference to 'rank' is ambiguous
34 | } else if (rank[rootU] < rank[rootV]) {
| ^~~~
/usr/include/c++/12.2.1/type_traits:1394:12: note: candidates are: 'template<class> struct std::rank'
1394 | struct rank
| ^~~~
main.cpp:19:21: note: 'std::vector<int> rank'
19 | vector<int> parent, rank;
| ^~~~
main.cpp:38:13: error: reference to 'rank' is ambiguous
38 | rank[rootU]++;
| ^~~~
/usr/include/c++/12.2.1/type_traits:1394:12: note: candidates are: 'template<class> struct std::rank'
1394 | struct rank
| ^~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !