Warning: session_start(): open(/tmp/sess_51cf6289a58b2e2ecc094fc0fd7279ea, O_RDWR) failed: No space left on device (28) in /data/wiki/inc/init.php on line 239

Warning: session_start(): Failed to read session data: files (path: ) in /data/wiki/inc/init.php on line 239

Warning: Cannot modify header information - headers already sent by (output started at /data/wiki/inc/init.php:239) in /data/wiki/inc/auth.php on line 430
Writing /data/wiki/data/cache/d/de2edb2fcb553ea79b79c722a4e13dbc.captchaip failed

Warning: Cannot modify header information - headers already sent by (output started at /data/wiki/inc/init.php:239) in /data/wiki/inc/Action/Export.php on line 103

Warning: Cannot modify header information - headers already sent by (output started at /data/wiki/inc/init.php:239) in /data/wiki/inc/Action/Export.php on line 103

Warning: Cannot modify header information - headers already sent by (output started at /data/wiki/inc/init.php:239) in /data/wiki/inc/Action/Export.php on line 103
[[http://acm.hdu.edu.cn/showproblem.php?pid=6581|HDU6581]] #include #include #include #include #include #define LL long long using namespace std; const int N=1e5+10; int n; LL l[N],s[N],v[N]; int read() { int x=0,f=1;char c=getchar(); while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();} while(c>='0'&&c<='9'){x=x*10+c-'0';c=getchar();} return x*f; } int main() { while(~scanf("%d",&n)) { LL len=0; double mint=0; for(int i=0;i<=n;i++)l[i]=read(); for(int i=0;i<=n;i++)s[i]=read(); for(int i=0;i<=n;i++)v[i]=read(); for(int i=0;i<=n;i++) { if(!i)mint=s[i]*1.0/v[i]; else len+=l[i],mint=max(mint,((s[i]+len)*1.0)/v[i]); } printf("%.10lf\n",mint); } return 0; }