Problem beareatrabbit
User loyaltypollution
Submission Time 2025-09-26 18:19:53
Score 0
Max Time N/A
Max Memory N/A

Compile Error

beareatrabbit.cpp: In function ‘int main()’:
beareatrabbit.cpp:19:11: error: ‘prev2’ was not declared in this scope
19 | r = max({prev2, max(0LL, K)});
| ^~~~~
beareatrabbit.cpp:19:30: error: no matching function for call to ‘max(<brace-enclosed initializer list>)’
19 | r = max({prev2, max(0LL, K)});
| ^
In file included from /usr/include/c++/9/algorithm:61,
from beareatrabbit.cpp:2:
/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:
beareatrabbit.cpp:19:30: note: candidate expects 2 arguments, 1 provided
19 | r = max({prev2, max(0LL, K)});
| ^
In file included