Borderou de evaluare (job #2840952)

Utilizator Vali_DeaconuVali Deaconu Vali_Deaconu Data 29 ianuarie 2022 02:38:11
Problema Cel mai lung subsir comun Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void f(const std::vector<int>&, const std::vector<int>&, std::vector<int>&)': main.cpp:20:72: error: no matching function for call to 'std::vector<int>::vector(const std::vector<int>&, std::vector<int>, std::vector<int>&)' 20 | f(vector<int>(A, vector<int>(B.begin(), B.begin() + B.size() - 1), p2); | ^ In file included from /usr/include/c++/10/vector:67, from main.cpp:2: /usr/include/c++/10/bits/stl_vector.h:653:2: note: candidate: 'template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with _InputIterator = _InputIterator; <template-parameter-2-2> = <template-parameter-1-2>; _Tp = int; _Alloc = std::allocator<int>]' 653 | vector(_InputIterator __first, _InputIterator __last, | ^~~~~~ /usr/include/c++/10/bits/stl_vector.h:653:2: note: template argument deduction/substitution failed: In file included from /usr/include/c++/10/bits/stl_algobase.h:65, from /usr/include/c++/10/bits/char_traits.h:39, from /usr/include/c++/10/ios:40, from /usr/include/c++/10/istream:38, from /usr/include/c++/10/fstream:38, from main.cpp:1: /usr/include/c++/10/bits/stl_iterator_base_types.h: In substitution of 'template<class _InIter> using _RequireInputIter = std::__enable_if_t<std::is_convertible<typename std::iterator_traits< <template-parameter-1-1> >::iterator_category, std::input_iterator_tag>::value> [with _InIter = std::vector<int>]': /usr/include/c++/10/bits/stl_vector.h:652:9: required from here /usr/include/c++/10/bits/stl_iterator_base_types.h:249:11: error: no type named 'iterator_category' in 'struct std::iterator_traits<std::vector<int> >' 249 | using _RequireInputIter = | ^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:67, from main.cpp:2: /usr/include/c++/10/bits/stl_vector.h:625:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<int>]' 625 | vector(initializer_list<value_type> __l, | ^~~~~~ /usr/include/c++/10/bits/stl_vector.h:625:7: note: candidate expects 2 arguments, 3 provided /usr/include/c++/10/bits/stl_vector.h:607:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<int>]' 607 | vector(vector&& __rv, const allocator_type& __m) | ^~~~~~ /usr/include/c++/10/bits/stl_vector.h:607:7: note: candidate expects 2 arguments, 3 provided /usr/include/c++/10/bits/stl_vector.h:589:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::false_type) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<int>; std::false_type = std::integral_constant<bool, false>]' 589 | vector(vector&& __rv, const allocator_type& __m, false_type) | ^~~~~~ /usr/include/c++/10/bits/stl_vector.h:589:51: note: no known conversion for argument 2 from 'std::vector<int>' to 'const allocator_type&' {aka 'const std::allocator<int>&'} 589 | vector(vector&& __rv, const allocator_type& __m, false_type) | ~~~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/stl_vector.h:585:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::true_type) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<int>; std::true_type = std::integral_constant<bool, true>]' 585 | vector(vector&& __rv, const allocator_type& __m, true_type) noexcept | ^~~~~~ /usr/include/c++/10/bits/stl_vector.h:585:51: note: no known conversion for argument 2 from 'std::vector<int>' to 'const allocator_type&' {aka 'const std::allocator<int>&'} 585 | vector(vector&& __rv, const allocator_type& __m, true_type) noexcept | ~~~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/stl_vector.h:575:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&, const allocator_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<int>]' 575 | vector(const vector& __x, const allocator_type& __a) | ^~~~~~ /usr/include/c++/10/bits/stl_vector.h:575:7: note: candidate expects 2 arguments, 3 provided /usr/include/c++/10/bits/stl_vector.h:572:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]' 572 | vector(vector&&) noexcept = default; | ^~~~~~ Non zero exit status: 1

Ceva nu functioneaza?