Problem feedtheduck
User Khai
Submission Time 2025-02-20 15:42:58
Score 0
Max Time N/A
Max Memory N/A

Compile Error

feedtheduck.cpp: In function ‘int main()’:
feedtheduck.cpp:19:24: error: ‘INT_MAX’ was not declared in this scope
19 | long long minSum = INT_MAX
| ^~~~~~~
feedtheduck.cpp:3:1: note: ‘INT_MAX’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’?
2 | #include <vector>
+++ |+#include <climits>
3 | #include <limits>
feedtheduck.cpp:21:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
21 | for (int right = 0; right < N; ++right) {
| ^
feedtheduck.cpp:21:38: error: lvalue required as increment operand
21 | for (int right = 0; right < N; ++right) {
| ^~~~~