Borderou de evaluare (job #2207270)

Utilizator cyborgGavrila Alex cyborg Data 25 mai 2018 13:36:27
Problema Grade Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘void label(std::vector<std::pair<int, int> >&)’: user.cpp:10:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i=0;i<_sequence.size();i++){ ~^~~~~~~~~~~~~~~~~ user.cpp:9:6: warning: unused variable ‘i’ [-Wunused-variable] int i = 0; ^ user.cpp: In function ‘bool degreeToGraph(std::vector<std::pair<int, int> >, std::__cxx11::list<std::pair<int, int> >&)’: user.cpp:18:54: error: wrong number of template arguments (1, should be 2) sort(_sequence.begin(), _sequence.end(), [](pair<int> x, pair<int> y) {return x.first > y.first; }); ^ In file included from /usr/include/c++/6/bits/stl_algobase.h:64: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 user.cpp:1: /usr/include/c++/6/bits/stl_pair.h:194:12: note: provided for ‘template<class _T1, class _T2> struct std::pair’ struct pair ^~~~ user.cpp:18:67: error: wrong number of template arguments (1, should be 2) sort(_sequence.begin(), _sequence.end(), [](pair<int> x, pair<int> y) {return x.first > y.first; }); ^ In file included from /usr/include/c++/6/bits/stl_algobase.h:64: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 user.cpp:1: /usr/include/c++/6/bits/stl_pair.h:194:12: note: provided for ‘template<class _T1, class _T2> struct std::pair’ struct pair ^~~~ user.cpp: In lambda function: user.cpp:18:82: error: request for member ‘first’ in ‘x’, which is of non-class type ‘int’ sort(_sequence.begin(), _sequence.end(), [](pair<int> x, pair<int> y) {return x.first > y.first; }); ^~~~~ user.cpp:18:92: error: request for member ‘first’ in ‘y’, which is of non-class type ‘int’ sort(_sequence.begin(), _sequence.end(), [](pair<int> x, pair<int> y) {return x.first > y.first; }); ^~~~~ user.cpp: In function ‘bool degreeToGraph(std::vector<std::pair<int, int> >, std::__cxx11::list<std::pair<int, int> >&)’: user.cpp:22:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < _sequence.size(); i++) { ~~^~~~~~~~~~~~~~~~~~ user.cpp:24:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (c.first > _sequence.size() - i - 1) return false; ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ user.cpp:31:55: error: wrong number of template arguments (1, should be 2) sort(_sequence.begin(), _sequence.end(), [](pair<int> x, pair<int> y) {return x.first > y.first; }); ^ In file included from /usr/include/c++/6/bits/stl_algobase.h:64:0,

Ceva nu functioneaza?