1004
#include<bits/stdc++.h> using namespace std; const int maxn=1e5+10; struct note { double s,v,l; } c[maxn]; int main() { int n; while(~scanf("%d",&n)) { for(int i=0; i<=n; i++) scanf("%lf",&c[i].l); for(int i=0; i<=n; i++) scanf("%lf",&c[i].s); for(int i=0; i<=n; i++) scanf("%lf",&c[i].v); double ans=0; double len=0; for(int i=0; i<=n; i++) { if(i!=0) len+=c[i].l; double t=(c[i].s+len)/c[i].v; ans=max(ans,t); } printf("%.10lf\n",ans); } }
2019 Multi-University Training Contest 1
原文:https://www.cnblogs.com/dongdong25800/p/11503037.html