Borderou de evaluare (job #3181773)

Utilizator adistancu10Stancu Adrian adistancu10 Data 7 decembrie 2023 21:29:09
Problema Bile Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void join(int, int)': main.cpp:32:13: error: reference to 'size' is ambiguous 32 | if (size[dx] < size[dy]) | ^~~~ 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/ostream:38, from /usr/include/c++/12.2.1/iostream:39, 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:13:13: note: 'std::vector<int> size' 13 | vector<int> size; | ^~~~ main.cpp:32:24: error: reference to 'size' is ambiguous 32 | if (size[dx] < size[dy]) | ^~~~ /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:13:13: note: 'std::vector<int> size' 13 | vector<int> size; | ^~~~ main.cpp:35:9: error: reference to 'size' is ambiguous 35 | size[dx] += size[dy]; | ^~~~ /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:13:13: note: 'std::vector<int> size' 13 | vector<int> size; | ^~~~ main.cpp:35:21: error: reference to 'size' is ambiguous 35 | size[dx] += size[dy]; | ^~~~ /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 | ^~~~ Non zero exit status: 1

Ceva nu functioneaza?