Borderou de evaluare (job #956648)

Utilizator poptibiPop Tiberiu poptibi Data 3 iunie 2013 16:07:38
Problema Produs 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:63:39: error: no matching function for call to ‘max(int, long long int)’ for(long long j = max(1, i - 5); j <= i; ++ j) ^ user.cpp:63:39: note: candidates are: In file included from /usr/local/include/c++/4.8.0/algorithm:61:0, from user.cpp:3: /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:63:39: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘long long int’) for(long long j = max(1, i - 5); j <= i; ++ j) ^ In file included from /usr/local/include/c++/4.8.0/algorithm:61:0, from user.cpp:3: /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:63:39: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘long long int’) for(long long j = max(1, i - 5); j <= i; ++ j) ^ In file included from /usr/local/include/c++/4.8.0/algorithm:62:0, from user.cpp:3: /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:63:39: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘int’ for(long long j = max(1, i - 5); j <= i; ++ j) ^ In file included from /usr/local/include/c++/4.8.0/algorithm:62:0, from user.cpp:3: /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:63:39: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘int’ for(long long j = max(1, i - 5); j <= i; ++ j) ^ user.cpp:100:31: warning: format ‘%i’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=] printf("%i %i\n", X, Y - 1); ^ user.cpp:100:31: warning: format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘long long int’ [-Wformat=]

Ceva nu functioneaza?