Borderou de evaluare (job #2040275)

Utilizator Cristi_ChiraChira Cristian Cristi_Chira Data 15 octombrie 2017 16:46:28
Problema Secv9 Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int cmp(std::pair<int, int>, std::pair<int, int>)’: user.cpp:12:14: error: ‘struct std::pair<int, int>’ has no member named ‘x’ return a.x < b.x; ^ user.cpp:12:20: error: ‘struct std::pair<int, int>’ has no member named ‘x’ return a.x < b.x; ^ user.cpp: In function ‘int main()’: user.cpp:21:10: error: no match for ‘operator[]’ (operand types are ‘std::pair<int, int>’ and ‘int’) a[i].x = a[i - 1].x + k; ^ user.cpp:21:19: error: no match for ‘operator[]’ (operand types are ‘std::pair<int, int>’ and ‘int’) a[i].x = a[i - 1].x + k; ^ user.cpp:22:10: error: no match for ‘operator[]’ (operand types are ‘std::pair<int, int>’ and ‘int’) a[i].y = i; ^ user.cpp:24:12: error: no match for ‘operator+’ (operand types are ‘std::pair<int, int>’ and ‘int’) sort(a + 1, a + n + 1, cmp); ^ user.cpp:24:12: note: candidates are: In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from user.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:333:5: note: template<class _Iterator> std::reverse_iterator<_Iterator> std::operator+(typename std::reverse_iterator<_Iterator>::difference_type, const std::reverse_iterator<_Iterator>&) operator+(typename reverse_iterator<_Iterator>::difference_type __n, ^ /usr/include/c++/4.8/bits/stl_iterator.h:333:5: note: template argument deduction/substitution failed: user.cpp:24:14: note: mismatched types ‘const std::reverse_iterator<_Iterator>’ and ‘int’ sort(a + 1, a + n + 1, cmp); ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from user.cpp:1: /usr/include/c++/4.8/bits/stl_iterator.h:1118:5: note: template<class _Iterator> std::move_iterator<_Iterator> std::operator+(typename std::move_iterator<_Iterator>::difference_type, const std::move_iterator<_Iterator>&) operator+(typename move_iterator<_Iterator>::difference_type __n, ^ /usr/include/c++/4.8/bits/stl_iterator.h:1118:5: note: template argument deduction/substitution failed: user.cpp:24:14: note: mismatched types ‘const std::move_iterator<_Iterator>’ and ‘int’ sort(a + 1, a + n + 1, cmp); ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41,

Ceva nu functioneaza?