【链接】
libreoj6162
【解题报告】
根据题目意思可知对于第
i
个人在第
#include<cstdio>
using namespace std;
const int maxn=1005;
int n;
double ans,v,u,a[maxn],b[maxn];
inline int Read()
{
int res=0;
char ch=getchar();
while (ch<'0'||ch>'9') ch=getchar();
while (ch>='0'&&ch<='9') res=res*10+ch-48,ch=getchar();
return res;
}
int main()
{
freopen("6162.in","r",stdin);
freopen("6162.out","w",stdout);
n=Read(); scanf("%lf%lf",&v,&u);
for (int i=1; i<=n; i++) scanf("%lf",&a[i]),a[i]-=v;
for (int i=1; i<=n; i++) scanf("%lf",&b[i]);
for (int i=1; i<=n; i++)
for (int j=1; j<=n; j++)
ans+=u/(a[i]-(j-1)*b[i]);
printf("%.3lf",ans);
return 0;
}