Borderou de evaluare (job #3032097)

Utilizator CalinHanguCalinHangu CalinHangu Data 21 martie 2023 14:17:22
Problema Flux maxim de cost minim Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:23:28: error: ISO C++ forbids declaration of 'aux' with no type [-fpermissive] 23 | bool operator <(const &aux) const{ | ^~~ main.cpp: In member function 'bool dragon::operator<(const int&) const': main.cpp:24:24: error: request for member 'w' in 'aux', which is of non-class type 'const int' 24 | return w < aux.w; | ^ In file included from /usr/include/c++/12.2.1/string:48, 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/stl_function.h: In instantiation of 'constexpr bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = dragon]': /usr/include/c++/12.2.1/bits/predefined_ops.h:196:23: required from 'constexpr bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = __gnu_cxx::__normal_iterator<dragon*, std::vector<dragon, std::allocator<dragon> > >; _Value = dragon; _Compare = std::less<dragon>]' /usr/include/c++/12.2.1/bits/stl_heap.h:140:48: required from 'constexpr void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<dragon*, vector<dragon, allocator<dragon> > >; _Distance = long int; _Tp = dragon; _Compare = __gnu_cxx::__ops::_Iter_comp_val<less<dragon> >]' /usr/include/c++/12.2.1/bits/stl_heap.h:216:23: required from 'constexpr void std::push_heap(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<dragon*, vector<dragon, allocator<dragon> > >; _Compare = less<dragon>]' /usr/include/c++/12.2.1/bits/stl_queue.h:749:16: required from 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(value_type&&) [with _Tp = dragon; _Sequence = std::vector<dragon, std::allocator<dragon> >; _Compare = std::less<dragon>; value_type = dragon]' main.cpp:48:12: required from here /usr/include/c++/12.2.1/bits/stl_function.h:408:20: error: no match for 'operator<' (operand types are 'const dragon' and 'const dragon') 408 | { return __x < __y; } | ~~~~^~~~~ In file included from /usr/include/c++/12.2.1/string:47: /usr/include/c++/12.2.1/bits/stl_iterator.h:579:5: note: candidate: 'template<class _IteratorL, class _IteratorR> requires three_way_comparable_with<_IteratorR, _IteratorL, std::partial_ordering> constexpr std::compare_three_way_result_t<_IteratorL, _IteratorR> std::operator<=>(const reverse_iterator<_IteratorL>&, const reverse_iterator<_IteratorR>&)' (reversed) 579 | operator<=>(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_iterator.h:579:5: note: template argument deduction/substitution failed: /usr/include/c++/12.2.1/bits/stl_function.h:408:20: note: 'const dragon' is not derived from 'const std::reverse_iterator<_IteratorL>' 408 | { return __x < __y; } | ~~~~^~~~~ /usr/include/c++/12.2.1/bits/stl_iterator.h:1668:5: note: candidate: 'template<class _IteratorL, class _IteratorR> requires three_way_comparable_with<_IteratorR, _IteratorL, std::partial_ordering> constexpr std::compare_three_way_result_t<_IteratorL, _IteratorR> std::operator<=>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' (reversed) 1668 | operator<=>(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_iterator.h:1668:5: note: template argument deduction/substitution failed: /usr/include/c++/12.2.1/bits/stl_function.h:408:20: note: 'const dragon' is not derived from 'const std::move_iterator<_IteratorL>' 408 | { return __x < __y; } | ~~~~^~~~~ /usr/include/c++/12.2.1/bits/stl_iterator.h:597:5: note: candidate: 'template<class _Iterator> requires three_way_comparable<_Iterator, std::partial_ordering> constexpr std::compare_three_way_result_t<_Iterator, _Iterator> std::operator<=>(const reverse_iterator<_IteratorL>&, const reverse_iterator<_IteratorL>&)' (rewritten) 597 | operator<=>(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_iterator.h:597:5: note: template argument deduction/substitution failed: /usr/include/c++/12.2.1/bits/stl_function.h:408:20: note: 'const dragon' is not derived from 'const std::reverse_iterator<_IteratorL>' 408 | { return __x < __y; } | ~~~~^~~~~ /usr/include/c++/12.2.1/bits/stl_iterator.h:1734:5: note: candidate: 'template<class _Iterator> requires three_way_comparable<_Iterator, std::partial_ordering> constexpr std::compare_three_way_result_t<_Iterator, _Iterator> std::operator<=>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' (rewritten) 1734 | operator<=>(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_iterator.h:1734:5: note: template argument deduction/substitution failed: /usr/include/c++/12.2.1/bits/stl_function.h:408:20: note: 'const dragon' is not derived from 'const std::move_iterator<_IteratorL>' Non zero exit status: 1

Ceva nu functioneaza?