Borderou de evaluare (job #3275258)

Utilizator AlexandruTigauTigau Alexandru AlexandruTigau Data 9 februarie 2025 16:01:19
Problema Radiatie Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void unionn(int, int)': main.cpp:26:8: error: reference to 'size' is ambiguous 26 | if(size[x]>size[y]) | ^~~~ 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/fstream:38, 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:5: note: 'int size [15005]' 13 | int size[15005],rep[15005],lift[20][15005],minedge[20][15005],father[15005],level[15005]; | ^~~~ main.cpp:26:16: error: reference to 'size' is ambiguous 26 | if(size[x]>size[y]) | ^~~~ /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:5: note: 'int size [15005]' 13 | int size[15005],rep[15005],lift[20][15005],minedge[20][15005],father[15005],level[15005]; | ^~~~ main.cpp:28:15: error: reference to 'size' is ambiguous 28 | rep[x]=y, size[y]+=size[x]; | ^~~~ /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:5: note: 'int size [15005]' 13 | int size[15005],rep[15005],lift[20][15005],minedge[20][15005],father[15005],level[15005]; | ^~~~ main.cpp:28:24: error: reference to 'size' is ambiguous 28 | rep[x]=y, size[y]+=size[x]; | ^~~~ /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?