记录编号 |
593576 |
评测结果 |
AAAAAAAAATTTTTTTTTTT |
题目名称 |
4019.呜呜呜 |
最终得分 |
45 |
用户昵称 |
李奇文 |
是否通过 |
未通过 |
代码语言 |
C++ |
运行时间 |
24.922 s |
提交时间 |
2024-09-05 21:18:54 |
内存使用 |
26.22 MiB |
显示代码纯文本
#include<bits/stdc++.h>
#define LL long long
using namespace std;
LL n,a[1000005],b[1000005],c[1000005];
LL ans;
int main(){
freopen("wuwuwu.in","r",stdin);
freopen("wuwuwu.out","w",stdout);
scanf("%d",&n);
for(LL i=1;i<=n;i++) scanf("%d",&a[i]);
for(LL i=1;i<=n;i++) scanf("%d",&b[i]);
for(LL i=1;i<=n;i++) scanf("%d",&c[i]);
for(LL i=1;i<=n;i++){
LL l=i,r=i,maxb=b[r],maxa=a[l];
LL ansf=1;
while(l){
if(c[l-1]>=c[l]){
l--;
maxa=max(maxa,a[l]);
}
else break;
}
while(r<=n){
if(c[r+1]>=c[r]){
r++;
maxb=max(maxb,b[r]);
}
else break;
}
ansf=maxa*maxb*c[i];
ans=max(ans,ansf);
}
printf("%lld",ans);
return 0;
}