Eismas (IOI 2010)

Taškai: 0

Compile: FAIL

eismas.cpp: In function ‘int main()’: eismas.cpp:43:37: error: no matching function for call to ‘max(__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type&, long long int&)’ at1=max(DP[i][y],at1); ^ In file included from /usr/include/c++/5/bits/char_traits.h:39:0, from /usr/include/c++/5/ios:40, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from eismas.cpp:1: /usr/include/c++/5/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&) max(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/5/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed: eismas.cpp:43:37: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘long long int’) at1=max(DP[i][y],at1); ^ In file included from /usr/include/c++/5/bits/char_traits.h:39:0, from /usr/include/c++/5/ios:40, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from eismas.cpp:1: /usr/include/c++/5/bits/stl_algobase.h:265:5: note: candidate: 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++/5/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed: eismas.cpp:43:37: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘long long int’) at1=max(DP[i][y],at1); ^ In file included from /usr/include/c++/5/algorithm:62:0, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:64, from eismas.cpp:2: /usr/include/c++/5/bits/stl_algo.h:3457:5: note: candidate: template<class _Tp> _Tp std::max(std::initializer_list<_Tp>) max(initializer_list<_Tp> __l) ^ /usr/include/c++/5/bits/stl_algo.h:3457:5: note: template argument deduction/substitution failed: eismas.cpp:43:37: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘int’ at1=max(DP[i][y],at1); ^ In file included from /usr/include/c++/5/algorithm:62:0, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:64, from eismas.cpp:2: /usr/include/c++/5/bits/stl_algo.h:3463:5: note: candidate: template<class _Tp, class _Compare> _Tp std::max(std::initializer_list<_Tp>, _Compare) max(initializer_list<_Tp> __l, _Compare __comp) ^ /usr/include/c++/5/bits/stl_algo.h:3463:5: note: template argument deduction/substitution failed: eismas.cpp:43:37: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘int’ at1=max(DP[i][y],at1); ^ eismas.cpp: In function ‘int gil(int, int)’: eismas.cpp:54:5: error: expected unqualified-id before ‘int’ int o; ^ eismas.cpp:64:13: error: ‘o’ was not declared in this scope o=i; ^ eismas.cpp:69:11: error: ‘o’ was not declared in this scope DP[v][o]=sa-(sum+x[v]); ^

nr.resulttimemessage