Problem | snack |
---|---|
User | user123 |
Submission Time | 2023-07-01 21:43:55 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
snack.cpp: In function ‘int main()’:
snack.cpp:19:19: error: incompatible types in assignment of ‘const int’ to ‘int [1000013]’
19 | dp=max(0, s[0]);
| ^
snack.cpp:22:26: error: no matching function for call to ‘max(int, int*)’
22 | dp=max(0, dp+s[a]);
| ^
In file included from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from snack.cpp:1:
/usr/include/c++/9/bits/stl_algobase.h:222:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)’
222 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/9/bits/stl_algobase.h:222:5: note: template argument deduction/substitution failed:
snack.cpp:22:26: note: deduced conflicting types for