Borderou de evaluare (job #1773760)

Utilizator elffikkVasile Ermicioi elffikk Data 8 octombrie 2016 10:40:34
Problema Infasuratoare convexa Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘bool cmpPoint(Point, Point)’: user.cpp:33:36: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] return (a.x<b.x) || (a.x==b.x) && (a.y<b.y); ^ user.cpp: In function ‘void sort_points()’: user.cpp:41:72: error: no matching function for call to ‘swap(__gnu_cxx::__normal_iterator<Point*, std::vector<Point> >, __gnu_cxx::__normal_iterator<Point*, std::vector<Point> >)’ swap(v.begin()+1, min_element(v.begin()+1, v.begin()+n+1, cmpPoint)); ^ user.cpp:41:72: note: candidates are: In file included from /usr/include/c++/4.8/bits/stl_pair.h:59:0, from /usr/include/c++/4.8/bits/stl_algobase.h:64, from /usr/include/c++/4.8/vector:60, from user.cpp:2: /usr/include/c++/4.8/bits/move.h:166:5: note: void std::swap(_Tp&, _Tp&) [with _Tp = __gnu_cxx::__normal_iterator<Point*, std::vector<Point> >] swap(_Tp& __a, _Tp& __b) ^ /usr/include/c++/4.8/bits/move.h:166:5: note: no known conversion for argument 1 from ‘__gnu_cxx::__normal_iterator<Point*, std::vector<Point> >’ to ‘__gnu_cxx::__normal_iterator<Point*, std::vector<Point> >&’ /usr/include/c++/4.8/bits/move.h:185:5: note: template<class _Tp, unsigned int _Nm> void std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm]) swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) ^ /usr/include/c++/4.8/bits/move.h:185:5: note: template argument deduction/substitution failed: user.cpp:41:72: note: mismatched types ‘_Tp [_Nm]’ and ‘__gnu_cxx::__normal_iterator<Point*, std::vector<Point> >’ swap(v.begin()+1, min_element(v.begin()+1, v.begin()+n+1, cmpPoint)); ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0, from /usr/include/c++/4.8/vector:60, from user.cpp:2: /usr/include/c++/4.8/bits/stl_pair.h:254:5: note: template<class _T1, class _T2> void std::swap(std::pair<_T1, _T2>&, std::pair<_T1, _T2>&) swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) ^ /usr/include/c++/4.8/bits/stl_pair.h:254:5: note: template argument deduction/substitution failed: user.cpp:41:72: note: ‘__gnu_cxx::__normal_iterator<Point*, std::vector<Point> >’ is not derived from ‘std::pair<_T1, _T2>’ swap(v.begin()+1, min_element(v.begin()+1, v.begin()+n+1, cmpPoint)); ^ In file included from /usr/include/c++/4.8/vector:64:0, from user.cpp:2: /usr/include/c++/4.8/bits/stl_vector.h:1451:5: note: template<class _Tp, class _Alloc> void std::swap(std::vector<_Tp, _Alloc>&, std::vector<_Tp, _Alloc>&) swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) ^ /usr/include/c++/4.8/bits/stl_vector.h:1451:5: note: template argument deduction/substitution failed: user.cpp:41:72: note: ‘__gnu_cxx::__normal_iterator<Point*, std::vector<Point> >’ is not derived from ‘std::vector<_Tp, _Alloc>’ swap(v.begin()+1, min_element(v.begin()+1, v.begin()+n+1, cmpPoint)); ^ In file included from /usr/include/c++/4.8/vector:65:0, from user.cpp:2: /usr/include/c++/4.8/bits/stl_bvector.h:112:3: note: void std::swap(std::_Bit_reference, std::_Bit_reference) swap(_Bit_reference __x, _Bit_reference __y) noexcept ^ /usr/include/c++/4.8/bits/stl_bvector.h:112:3: note: no known conversion for argument 1 from ‘__gnu_cxx::__normal_iterator<Point*, std::vector<Point> >’ to ‘std::_Bit_reference’ /usr/include/c++/4.8/bits/stl_bvector.h:120:3: note: void std::swap(std::_Bit_reference, bool&)

Ceva nu functioneaza?