Borderou de evaluare (job #1169398)

Utilizator MKLOLDragos Ristache MKLOL Data 11 aprilie 2014 00:40:59
Problema Maxq 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:94:18: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long long int*’ [-Wformat=] scanf("%d",&M); ^ user.cpp:101:42: error: no matching function for call to ‘max(long long int&, int)’ printf("%lld\n",max(retbest,0)); ^ user.cpp:101:42: note: candidates are: In file included from /usr/local/include/c++/4.8.0/algorithm:61:0, from user.cpp:2: /usr/local/include/c++/4.8.0/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/local/include/c++/4.8.0/bits/stl_algobase.h:216:5: note: template argument deduction/substitution failed: user.cpp:101:42: note: deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘int’) printf("%lld\n",max(retbest,0)); ^ In file included from /usr/local/include/c++/4.8.0/algorithm:61:0, from user.cpp:2: /usr/local/include/c++/4.8.0/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/local/include/c++/4.8.0/bits/stl_algobase.h:260:5: note: template argument deduction/substitution failed: user.cpp:101:42: note: deduced conflicting types for parameter ‘const _Tp’ (‘long long int’ and ‘int’) printf("%lld\n",max(retbest,0)); ^ In file included from /usr/local/include/c++/4.8.0/algorithm:62:0, from user.cpp:2: /usr/local/include/c++/4.8.0/bits/stl_algo.h:4254:5: note: template<class _Tp> _Tp std::max(std::initializer_list<_Tp>) max(initializer_list<_Tp> __l) ^ /usr/local/include/c++/4.8.0/bits/stl_algo.h:4254:5: note: template argument deduction/substitution failed: user.cpp:101:42: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘long long int’ printf("%lld\n",max(retbest,0)); ^ In file included from /usr/local/include/c++/4.8.0/algorithm:62:0, from user.cpp:2: /usr/local/include/c++/4.8.0/bits/stl_algo.h:4259:5: note: template<class _Tp, class _Compare> _Tp std::max(std::initializer_list<_Tp>, _Compare) max(initializer_list<_Tp> __l, _Compare __comp) ^ /usr/local/include/c++/4.8.0/bits/stl_algo.h:4259:5: note: template argument deduction/substitution failed: user.cpp:101:42: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘long long int’ printf("%lld\n",max(retbest,0)); ^

Ceva nu functioneaza?