Borderou de evaluare (job #2005169)

Utilizator Moise_AndreiMoise Andrei Moise_Andrei Data 26 iulie 2017 14:48:31
Problema Smooth Status done
Runda Algoritmiada 2017 Runda 2 Juniori Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:41:17: error: no matching function for call to ‘max(long long int&, int)’ a = max(a, 2); ^ user.cpp:41:17: 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/ostream:38, from /usr/include/c++/4.8/iostream:39, 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:41:17: note: deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘int’) a = max(a, 2); ^ 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/ostream:38, from /usr/include/c++/4.8/iostream:39, from user.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare) max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template argument deduction/substitution failed: user.cpp:41:17: note: deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘int’) a = max(a, 2); ^ user.cpp:50:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < p.size(); i ++) ^ user.cpp:40:9: warning: unused variable ‘mn’ [-Wunused-variable] int mn = 0; ^ user.cpp:42:9: warning: unused variable ‘nr2’ [-Wunused-variable] int nr2 = 0, nr3 = 0; ^ user.cpp:42:18: warning: unused variable ‘nr3’ [-Wunused-variable] int nr2 = 0, nr3 = 0; ^

Ceva nu functioneaza?