| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1159744 | gelastropod | 3D Histogram (COCI20_histogram) | C++20 | 2594 ms | 4536 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
int n, a, b;
cin >> n;
vector<pair<int, int>> vals;
for (int i = 0; i < n; i++) {
cin >> a >> b;
vals.push_back({a, b});
}
int ans = 0;
for (int i = 0; i < n; i++) {
int minW = LLONG_MAX;
int minH = minW;
for (int j = i; j < n; j++) {
minW = min(minW, vals[j].first);
minH = min(minH, vals[j].second);
ans = max(ans, minW * minH * (j - i + 1));
}
}
cout << ans << '\n';
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
