Borderou de evaluare (job #3209979)

Utilizator AlexZeuVasile Alexandru AlexZeu Data 4 martie 2024 10:47:40
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 unite(int, int)': main.cpp:36:9: error: reference to 'size' is ambiguous 36 | if (size[root1] > size[root2]) { | ^~~~ In file included from /usr/include/c++/12.2.1/string:52, from /usr/include/c++/12.2.1/bits/locale_classes.h:40, from /usr/include/c++/12.2.1/bits/ios_base.h:41, from /usr/include/c++/12.2.1/ios:42, from /usr/include/c++/12.2.1/istream:38, from /usr/include/c++/12.2.1/sstream:38, from /usr/include/c++/12.2.1/complex:45, from /usr/include/c++/12.2.1/ccomplex:39, from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:54, from main.cpp:1: /usr/include/c++/12.2.1/bits/range_access.h:274:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])' 274 | size(const _Tp (&)[_Nm]) noexcept | ^~~~ /usr/include/c++/12.2.1/bits/range_access.h:264:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)' 264 | size(const _Container& __cont) noexcept(noexcept(__cont.size())) | ^~~~ main.cpp:17:13: note: 'std::vector<int> size' 17 | vector<int> size; | ^~~~ main.cpp:36:23: error: reference to 'size' is ambiguous 36 | if (size[root1] > size[root2]) { | ^~~~ /usr/include/c++/12.2.1/bits/range_access.h:274:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])' 274 | size(const _Tp (&)[_Nm]) noexcept | ^~~~ /usr/include/c++/12.2.1/bits/range_access.h:264:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)' 264 | size(const _Container& __cont) noexcept(noexcept(__cont.size())) | ^~~~ main.cpp:17:13: note: 'std::vector<int> size' 17 | vector<int> size; | ^~~~ main.cpp:38:9: error: reference to 'size' is ambiguous 38 | size[root1] += size[root2]; | ^~~~ /usr/include/c++/12.2.1/bits/range_access.h:274:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])' 274 | size(const _Tp (&)[_Nm]) noexcept | ^~~~ /usr/include/c++/12.2.1/bits/range_access.h:264:5: note: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)' 264 | size(const _Container& __cont) noexcept(noexcept(__cont.size())) | ^~~~ main.cpp:17:13: note: 'std::vector<int> size' 17 | vector<int> size; | ^~~~ main.cpp:38:24: error: reference to 'size' is ambiguous 38 | size[root1] += size[root2]; | ^~~~ Non zero exit status: 1

Ceva nu functioneaza?