Borderou de evaluare (job #3229307)

Utilizator hydrargyrum_Alba Serban hydrargyrum_ Data 15 mai 2024 09:23:14
Problema Desen 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:35:13: error: reference to 'rank' is ambiguous 35 | if (rank[rootX] > rank[rootY]) | ^~~~ In file included from /usr/include/c++/12.2.1/bits/stl_pair.h:60, from /usr/include/c++/12.2.1/bits/stl_algobase.h:64, from /usr/include/c++/12.2.1/vector:60, from main.cpp:2: /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:35:27: error: reference to 'rank' is ambiguous 35 | if (rank[rootX] > rank[rootY]) | ^~~~ /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:39:17: error: reference to 'rank' is ambiguous 39 | if (rank[rootX] == rank[rootY]) | ^~~~ /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:39:32: error: reference to 'rank' is ambiguous 39 | if (rank[rootX] == rank[rootY]) | ^~~~ /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:40:17: error: reference to 'rank' is ambiguous 40 | rank[rootY]++; | ^~~~ /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; | ^~~~ Non zero exit status: 1

Ceva nu functioneaza?