| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 875330 | TAhmed33 | 3D Histogram (COCI20_histogram) | C++98 | 2556 ms | 6064 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main () {
int n;
cin >> n;
pair <int, int> arr[n + 1];
for (int i = 1; i <= n; i++) cin >> arr[i].first >> arr[i].second;
int ans = 0;
for (int i = 1; i <= n; i++) {
int mn1 = 1e9, mn2 = 1e9;
for (int j = i; j <= n; j++) {
mn1 = min(mn1, arr[j].first);
mn2 = min(mn2, arr[j].second);
ans = max(ans, mn1 * mn2 * (j - i + 1));
}
}
cout << ans << '\n';
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
