Problem twomeals
User thatlycheeoolongdrink
Submission Time 2024-03-22 14:07:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

twomeals.cpp: In function ‘int kadane(const std::vector<int>&)’:
twomeals.cpp:8:18: error: ‘INT_MIN’ was not declared in this scope
8 | int maxSum = INT_MIN, currentSum = 0;
| ^~~~~~~
twomeals.cpp:4:1: note: ‘INT_MIN’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’?
3 | #include <algorithm>
+++ |+#include <climits>
4 |
twomeals.cpp:10:9: error: ‘currentSum’ was not declared in this scope
10 | currentSum = max(num, currentSum + num);
| ^~~~~~~~~~