Problem catlunch
User highdelao
Submission Time 2025-02-19 00:10:34
Score 0
Max Time N/A
Max Memory N/A

Compile Error

catlunch.cpp: In function ‘int max_satisfaction(int, int, const std::vector<int>&)’:
catlunch.cpp:10:28: error: ‘INT_MIN’ was not declared in this scope
10 | int max_satisfaction = INT_MIN;
| ^~~~~~~
catlunch.cpp:5:1: note: ‘INT_MIN’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’?
4 | #include <algorithm>
+++ |+#include <climits>
5 |
catlunch.cpp:30:61: error: no matching function for call to ‘max(int&, long long int&)’
30 | max_satisfaction = max(max_satisfaction, current_sum);
| ^
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 catlunch.cpp:1:
/usr/include/c++/9/bit