# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1159653 | Sandarach151 | 3D Histogram (COCI20_histogram) | C++20 | 1 ms | 320 KiB |
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
int a[n];
int b[n];
int ans = 0;
for(int i=0; i<n; i++){
cin >> a[i] >> b[i];
if(i>0){
a[i] = min(a[i], a[i-1]);
b[i] = min(b[i], b[i-1]);
}
ans = max(ans, a[i]*b[i]*(i+1));
}
cout << ans << '\n';
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |