# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
482404 | 2021-10-24T12:42:59 Z | rainboy | 3D Histogram (COCI20_histogram) | C | 4 ms | 204 KB |
#include <stdio.h> #define N 200000 #define INF 0x3f3f3f3f #define LINF 0x3f3f3f3f3f3f3f3fLL int min(int a, int b) { return a < b ? a : b; } long long max(int a, int b) { return a > b ? a : b; } int main() { static int aa[N], bb[N]; int n, i, j; long long ans; scanf("%d", &n); for (i = 0; i < n; i++) scanf("%d%d", &aa[i], &bb[i]); ans = 0; for (i = 0; i < n; i++) { int a = INF, b = INF; for (j = i; j < n; j++) { a = min(a, aa[j]), b = min(b, bb[j]); ans = max(ans, (long long) a * b * (j - i + 1)); } } printf("%lld\n", ans); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |