Problem monsters2
User potatoed78
Submission Time 2025-06-19 08:38:08
Score 0
Max Time N/A
Max Memory N/A

Compile Error

monsters2.cpp: In function ‘int main()’:
monsters2.cpp:79:32: error: expected ‘;’ before ‘long’
79 | else max = *next(itmax)
| ^
| ;
80 |
81 | long long dist;
| ~~~~
monsters2.cpp:85:4: error: ‘dist’ was not declared in this scope
85 | dist = abs(max-a[i]);
| ^~~~
monsters2.cpp:91:4: error: ‘dist’ was not declared in this scope
91 | dist = abs(max-a[i]);
| ^~~~
monsters2.cpp:96:4: error: ‘dist’ was not declared in this scope
96 | dist = abs(a[i]-min);
| ^~~~
monsters2.cpp:103:15: error: ‘dist’ was not declared in this scope
103 | if (h[i] <= dist) money += h[i];
| ^~~~