Borderou de evaluare (job #2624810)

Utilizator iuliangal186Gal Iulian iuliangal186 Data 5 iunie 2020 14:12:40
Problema Muzica 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:20:19: error: no matching function for call to 'std::vector<long long int>::insert(long long int&)' v.insert(x); ^ In file included from /usr/include/c++/6/vector:69:0, from main.cpp:3: /usr/include/c++/6/bits/vector.tcc:107:5: note: candidate: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, const value_type&) [with _Tp = long long int; _Alloc = std::allocator<long long int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = long long int*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const long long int*, std::vector<long long int> >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const long long int*; std::vector<_Tp, _Alloc>::value_type = long long int] vector<_Tp, _Alloc>:: ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/6/bits/vector.tcc:107:5: note: candidate expects 2 arguments, 1 provided In file included from /usr/include/c++/6/vector:64:0, from main.cpp:3: /usr/include/c++/6/bits/stl_vector.h:1015:7: note: candidate: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = long long int; _Alloc = std::allocator<long long int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = long long int*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const long long int*, std::vector<long long int> >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const long long int*; std::vector<_Tp, _Alloc>::value_type = long long int] insert(const_iterator __position, value_type&& __x) ^~~~~~ /usr/include/c++/6/bits/stl_vector.h:1015:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/6/bits/stl_vector.h:1032:7: note: candidate: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, std::initializer_list<_Tp>) [with _Tp = long long int; _Alloc = std::allocator<long long int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = long long int*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const long long int*, std::vector<long long int> >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const long long int*] insert(const_iterator __position, initializer_list<value_type> __l) ^~~~~~ /usr/include/c++/6/bits/stl_vector.h:1032:7: note: candidate expects 2 arguments, 1 provided /usr/include/c++/6/bits/stl_vector.h:1052:7: note: candidate: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = long long int; _Alloc = std::allocator<long long int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = long long int*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const long long int*, std::vector<long long int> >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const long long int*; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = long long int] insert(const_iterator __position, size_type __n, const value_type& __x) ^~~~~~ /usr/include/c++/6/bits/stl_vector.h:1052:7: note: candidate expects 3 arguments, 1 provided /usr/include/c++/6/bits/stl_vector.h:1096:9: note: candidate: template<class _InputIterator, class> std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, _InputIterator, _InputIterator) [with _InputIterator = _InputIterator; <template-parameter-2-2> = <template-parameter-1-2>; _Tp = long long int; _Alloc = std::allocator<long long int>] insert(const_iterator __position, _InputIterator __first, ^~~~~~ /usr/include/c++/6/bits/stl_vector.h:1096:9: note: template argument deduction/substitution failed: main.cpp:20:19: note: candidate expects 3 arguments, 1 provided v.insert(x); ^ main.cpp:24:22: error: 'class std::vector<long long int>' has no member named 'find'; did you mean 'end'? auto itr = v.find(a); ^~~~ Non zero exit status: 1

Ceva nu functioneaza?