Problem labels
User shenshiqi
Submission Time 2026-01-04 16:47:34
Score 0
Max Time N/A
Max Memory N/A

Compile Error

labels.cpp: In function ‘int main()’:
labels.cpp:13:12: error: ‘LLONG_MAX’ was not declared in this scope
13 | ll minP = LLONG_MAX, maxP = LLONG_MIN;
| ^~~~~~~~~
labels.cpp:2:1: note: ‘LLONG_MAX’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’?
1 | #include <iostream>
+++ |+#include <climits>
2 | using namespace std;
labels.cpp:21:3: error: ‘maxP’ was not declared in this scope
21 | maxP = max(maxP, prefixSum[i]);
| ^~~~
labels.cpp:35:28: error: ‘maxP’ was not declared in this scope
35 | ll ub = min(n - minP, n - maxP);
| ^~~~