Borderou de evaluare (job #3172082)

Utilizator beingsebiPopa Sebastian beingsebi Data 19 noiembrie 2023 23:09:51
Problema Apm2 Status done
Runda Arhiva Monthly Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void unify(short int, short int)': main.cpp:27:9: error: reference to 'size' is ambiguous 27 | if (size[a] < size[b]) | ^~~~ 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:8:23: note: 'short int size [10002]' 8 | short int par[10002], size[10002]; | ^~~~ main.cpp:27:19: error: reference to 'size' is ambiguous 27 | if (size[a] < size[b]) | ^~~~ /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:8:23: note: 'short int size [10002]' 8 | short int par[10002], size[10002]; | ^~~~ main.cpp:29:5: error: reference to 'size' is ambiguous 29 | size[a] += size[b]; | ^~~~ /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:8:23: note: 'short int size [10002]' 8 | short int par[10002], size[10002]; | ^~~~ main.cpp:29:16: error: reference to 'size' is ambiguous 29 | size[a] += size[b]; | ^~~~ Non zero exit status: 1

Ceva nu functioneaza?