Borderou de evaluare (job #2619069)

Utilizator ADINAIOANA-BORTAAdina Borta ADINAIOANA-BORTA Data 26 mai 2020 20:56:49
Problema Beri Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:22:22: error: no match for 'operator+' (operand types are 'std::vector<int>' and 'int') nth_element(c, c + n - k - 1, c + n); ~~^~~ In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0, from /usr/include/c++/6/bits/char_traits.h:39, from /usr/include/c++/6/ios:40, from /usr/include/c++/6/ostream:38, from /usr/include/c++/6/iostream:39, from main.cpp:1: /usr/include/c++/6/bits/stl_iterator.h:341:5: note: candidate: template<class _Iterator> std::reverse_iterator<_Iterator> std::operator+(typename std::reverse_iterator<_Iterator>::difference_type, const std::reverse_iterator<_Iterator>&) operator+(typename reverse_iterator<_Iterator>::difference_type __n, ^~~~~~~~ /usr/include/c++/6/bits/stl_iterator.h:341:5: note: template argument deduction/substitution failed: main.cpp:22:24: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int' nth_element(c, c + n - k - 1, c + n); ^ In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0, from /usr/include/c++/6/bits/char_traits.h:39, from /usr/include/c++/6/ios:40, from /usr/include/c++/6/ostream:38, from /usr/include/c++/6/iostream:39, from main.cpp:1: /usr/include/c++/6/bits/stl_iterator.h:1200:5: note: candidate: template<class _Iterator> std::move_iterator<_IteratorL> std::operator+(typename std::move_iterator<_IteratorL>::difference_type, const std::move_iterator<_IteratorL>&) operator+(typename move_iterator<_Iterator>::difference_type __n, ^~~~~~~~ /usr/include/c++/6/bits/stl_iterator.h:1200:5: note: template argument deduction/substitution failed: main.cpp:22:24: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int' nth_element(c, c + n - k - 1, c + n); ^ In file included from /usr/include/c++/6/string:52:0, from /usr/include/c++/6/bits/locale_classes.h:40, from /usr/include/c++/6/bits/ios_base.h:41, from /usr/include/c++/6/ios:42, from /usr/include/c++/6/ostream:38, from /usr/include/c++/6/iostream:39, from main.cpp:1: /usr/include/c++/6/bits/basic_string.h:4947:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, ^~~~~~~~ /usr/include/c++/6/bits/basic_string.h:4947:5: note: template argument deduction/substitution failed: main.cpp:22:24: note: 'std::vector<int>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' nth_element(c, c + n - k - 1, c + n); ^ In file included from /usr/include/c++/6/string:53:0, from /usr/include/c++/6/bits/locale_classes.h:40, from /usr/include/c++/6/bits/ios_base.h:41, from /usr/include/c++/6/ios:42, from /usr/include/c++/6/ostream:38, from /usr/include/c++/6/iostream:39, Non zero exit status: 1

Ceva nu functioneaza?