Borderou de evaluare (job #3317573)

Utilizator Johnny16Filote Ionut Johnny16 Data 24 octombrie 2025 15:07:24
Problema Paduri de multimi disjuncte Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void initializare(int)': main.cpp:11:5: error: reference to 'rank' is ambiguous 11 | rank.resize(n+1,0); | ^~~~ 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:8:13: note: 'std::vector<int> rank' 8 | vector<int> rank; | ^~~~ main.cpp: In function 'int find_radacina(int)': main.cpp:16:8: error: 'parent' was not declared in this scope; did you mean 'parinte'? 16 | if(parent[i]==i) | ^~~~~~ | parinte main.cpp:18:12: error: 'parent' was not declared in this scope; did you mean 'parinte'? 18 | return parent[i]=find_radacina(parent[i]); | ^~~~~~ | parinte main.cpp: In function 'void unire(int, int)': main.cpp:26:12: error: reference to 'rank' is ambiguous 26 | if(rank[x]<rank[y]) | ^~~~ /usr/include/c++/12.2.1/type_traits:1394:12: note: candidates are: 'template<class> struct std::rank' 1394 | struct rank | ^~~~ main.cpp:8:13: note: 'std::vector<int> rank' 8 | vector<int> rank; | ^~~~ main.cpp:26:20: error: reference to 'rank' is ambiguous 26 | if(rank[x]<rank[y]) | ^~~~ /usr/include/c++/12.2.1/type_traits:1394:12: note: candidates are: 'template<class> struct std::rank' 1394 | struct rank | ^~~~ main.cpp:8:13: note: 'std::vector<int> rank' 8 | vector<int> rank; | ^~~~ main.cpp:30:17: error: reference to 'rank' is ambiguous 30 | else if(rank[y]>rank[x]){ | ^~~~ /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?