Borderou de evaluare (job #1872638)

Utilizator rares96cheseliRares Cheseli rares96cheseli Data 8 februarie 2017 14:14:26
Problema Gard 5 Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:36:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 1; i < special.size(); ++i) { ^ user.cpp:38:56: error: no matching function for call to ‘sort(int*, __gnu_cxx::__alloc_traits<std::allocator<int> >::value_type)’ sort(a + special[i - 1] + 1, special[i] - 1); ^ user.cpp:38:56: note: candidates are: In file included from /usr/include/c++/4.8/algorithm:62:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from user.cpp:1: /usr/include/c++/4.8/bits/stl_algo.h:5461:5: note: template<class _RAIter> void std::sort(_RAIter, _RAIter) sort(_RandomAccessIterator __first, _RandomAccessIterator __last) ^ /usr/include/c++/4.8/bits/stl_algo.h:5461:5: note: template argument deduction/substitution failed: user.cpp:38:56: note: deduced conflicting types for parameter ‘_RAIter’ (‘int*’ and ‘int’) sort(a + special[i - 1] + 1, special[i] - 1); ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from user.cpp:1: /usr/include/c++/4.8/bits/stl_algo.h:5497:5: note: template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare) sort(_RandomAccessIterator __first, _RandomAccessIterator __last, ^ /usr/include/c++/4.8/bits/stl_algo.h:5497:5: note: template argument deduction/substitution failed: user.cpp:38:56: note: deduced conflicting types for parameter ‘_RAIter’ (‘int*’ and ‘int’) sort(a + special[i - 1] + 1, special[i] - 1); ^ user.cpp:49:41: error: no matching function for call to ‘max(ll&, int)’ g << cost << ' ' << max(nrMinCost, 1) << '\n'; ^ user.cpp:49:41: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/sstream:38, from /usr/include/c++/4.8/complex:45, from /usr/include/c++/4.8/ccomplex:38, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52, from user.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&) max(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template argument deduction/substitution failed: user.cpp:49:41: note: deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘int’) g << cost << ' ' << max(nrMinCost, 1) << '\n'; ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38,

Ceva nu functioneaza?