Problem catlunch
User beefburger
Submission Time 2026-02-19 09:26:50
Score 0
Max Time N/A
Max Memory N/A

Compile Error

catlunch.cpp: In function ‘int main()’:
catlunch.cpp:15:27: error: expected ‘;’ before ‘if’
15 | cmax = max(t[i-1], t[i])
| ^
| ;
16 | if (cmax < 0) {
| ~~
catlunch.cpp:18:5: error: ‘else’ without a previous ‘if’
18 | } else {
| ^~~~
catlunch.cpp:19:17: error: ‘v’ was not declared in this scope
19 | t.erase(find(v.begin(), v.end(), cmax));
| ^