Borderou de evaluare (job #2702957)

Utilizator IRadu1529Radu Ionescu IRadu1529 Data 6 februarie 2021 13:18:50
Problema Por Costel si Algoritmul Status done
Runda Arhiva ICPC Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In constructor 'muchie::muchie(int, long long int, int)': main.cpp:15:19: warning: 'muchie::distanta' will be initialized after [-Wreorder] long long int distanta; ^~~~~~~~ main.cpp:14:13: warning: 'int muchie::nrM' [-Wreorder] int el, nrM; ^~~ main.cpp:17:5: warning: when initialized here [-Wreorder] muchie(int el, long long int distanta, int nrM) ^~~~~~ main.cpp: In function 'int main()': main.cpp:49:58: error: no matching function for call to 'std::vector<nod>::erase()' for (int i = 0; i <= 100001; ++i) liste[i].erase(); ^ In file included from /usr/include/c++/6/vector:64:0, from main.cpp:2: /usr/include/c++/6/bits/stl_vector.h:1147:7: note: candidate: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::const_iterator) [with _Tp = nod; _Alloc = std::allocator<nod>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<nod*, std::vector<nod> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = nod*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const nod*, std::vector<nod> >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const nod*] erase(const_iterator __position) ^~~~~ /usr/include/c++/6/bits/stl_vector.h:1147:7: note: candidate expects 1 argument, 0 provided /usr/include/c++/6/bits/stl_vector.h:1174:7: note: candidate: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::const_iterator, std::vector<_Tp, _Alloc>::const_iterator) [with _Tp = nod; _Alloc = std::allocator<nod>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<nod*, std::vector<nod> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = nod*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const nod*, std::vector<nod> >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const nod*] erase(const_iterator __first, const_iterator __last) ^~~~~ /usr/include/c++/6/bits/stl_vector.h:1174:7: note: candidate expects 2 arguments, 0 provided main.cpp:102:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < liste[top.el].size(); i++) ~~^~~~~~~~~~~~~~~~~~~~~~ Non zero exit status: 1

Ceva nu functioneaza?