Problem catlunch
User jamallikestocode
Submission Time 2026-04-06 16:20:19
Score 0
Max Time N/A
Max Memory N/A

Compile Error

catlunch.cpp: In function ‘int main()’:
catlunch.cpp:10:5: error: expected ‘,’ or ‘;’ before ‘long’
10 | long long max;
| ^~~~
catlunch.cpp:17:37: error: overloaded function with no contextual type information
17 | max = max_element(a[0], a[K]);
| ^
catlunch.cpp:18:12: error: parse error in template argument list
18 | if(max < 0){
| ^~~~~~~
catlunch.cpp:18:19: error: cannot resolve overloaded function ‘max’ based on conversion to type ‘bool’
18 | if(max < 0){
| ^
catlunch.cpp:21:25: error: overloaded function with no contextual type information
21 | satisfaction += max;
| ^~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:71,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,