Borderou de evaluare (job #3031931)
Utilizator | Data | 21 martie 2023 10:01:26 | |
---|---|---|---|
Problema | Deque | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:22:29: error: expected ';' before '}' token
22 | dq.push_front(i)
| ^
| ;
23 | }
| ~
main.cpp:26:28: error: no match for 'operator<' (operand types are 'std::deque<int>::iterator' {aka 'std::_Deque_base<int, std::allocator<int> >::iterator'} and 'int')
26 | if (dq.begin() < i-k+1) //nu este in ultimele k elemente
| ~~~~~~~~~~ ^ ~~~~~
| | |
| | int
| std::deque<int>::iterator {aka std::_Deque_base<int, std::allocator<int> >::iterator}
In file included from /usr/include/c++/12.2.1/string:47,
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_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:
main.cpp:26:34: note: mismatched types 'const std::reverse_iterator<_IteratorL>' and 'int'
26 | if (dq.begin() < i-k+1) //nu este in ultimele k elemente
| ^
/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:
main.cpp:26:34: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int'
26 | if (dq.begin() < i-k+1) //nu este in ultimele k elemente
| ^
In file included from /usr/include/c++/12.2.1/bits/basic_string.h:47,
from /usr/include/c++/12.2.1/string:53:
/usr/include/c++/12.2.1/string_view:561:5: note: candidate: 'template<class _CharT, class _Traits> constexpr decltype (__char_traits_cmp_cat<_Traits>(0)) std::operator<=>(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' (reversed)
561 | operator<=>(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/12.2.1/string_view:561:5: note: template argument deduction/substitution failed:
main.cpp:26:34: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
26 | if (dq.begin() < i-k+1) //nu este in ultimele k elemente
| ^
/usr/include/c++/12.2.1/bits/basic_string.h:3627:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> constexpr decltype (__char_traits_cmp_cat<_Traits>(0)) std::operator<=>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' (reversed)
3627 | operator<=>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/basic_string.h:3627:5: note: template argument deduction/substitution failed:
main.cpp:26:34: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
26 | if (dq.begin() < i-k+1) //nu este in ultimele k elemente
| ^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !