Borderou de evaluare (job #1535766)

Utilizator alex_HarryBabalau Alexandru alex_Harry Data 25 noiembrie 2015 09:39:08
Problema Xp Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:8:31: error: conflicting declaration ‘long long int P [2005]’ long long Product[2005],P[2005]; ^ user.cpp:6:17: error: ‘P’ has a previous declaration as ‘long long int P’ long long N,A,B,P,Q; ^ user.cpp: In function ‘void precalcProduct()’: user.cpp:23:54: error: no matching function for call to ‘max(int, long long int)’ int val=max(1,((i%P) ^ (((A+1) & (B+1))%P)%P)); ^ user.cpp:23:54: 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/fstream:38, 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:23:54: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘long long int’) int val=max(1,((i%P) ^ (((A+1) & (B+1))%P)%P)); ^ 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/fstream:38, 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:23:54: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘long long int’) int val=max(1,((i%P) ^ (((A+1) & (B+1))%P)%P)); ^ user.cpp:40:12: error: invalid types ‘long long int[int]’ for array subscript P[i]=p; ^ user.cpp: In function ‘void Solve()’: user.cpp:52:60: error: no matching function for call to ‘max(int, long long int)’ long long val=max(1,((i%P) ^ (((A+1) & (B+1))%P)%P)); ^ user.cpp:52:60: 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/fstream:38, 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)

Ceva nu functioneaza?