| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1159665 | YSH2020 | 3D Histogram (COCI20_histogram) | C++20 | 2594 ms | 3396 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
int n; cin >> n;
vector<pair<int,int>> a(n); for (int i = 0; i < n; i++) cin >> a[i].first >> a[i].second;
int ans = 0;
for (int i = 0; i < n; i++) {
int h = a[i].first, w = a[i].second;
ans = max(ans, h*w);
for (int j = i-1; j >= 0; j--) {
h = min(h, a[j].first);
w = min(w, a[j].second);
ans = max(ans, h*w*(i-j+1));
}
}
cout << ans;
}
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
