#include<iostream>
#include<vector>
using namespace std;
int main()
{
int n;
cin>>n;
vector<int> hs;
int t;
for(int i=0;i<n;i++)
{
cin>>t;
hs.push_back(t);
}
int max=0,h;
for(int i=0;i<n;i++)
{
h=99999;
for(int j=i;j<n;j++)
{
t=hs.at(j);
h=(h>t?t:h);
t=(j-i+1)*h;
max=(t>max?t:max);
}
}
cout<<max<<endl;
return 0;
}
ccf 201312-3
最新推荐文章于 2021-04-08 10:46:51 发布