35分
#include<bits/stdc++.h>
#include<vector>
#define For(i,l,r) for(int i=l;i<=r;i++)
#define Rof(i,l,r) for(int i=l;i>=r;i--)
#define show(a) For(i,1,n) cerr<<a[i]<<' ';cerr<<'\n'
using namespace std;
#define P pair<int,int>
#define int long long
#define double long double
#define x first
#define y second
inline int rd(){
char c;bool f=false;while(!isdigit(c=getchar()))f=c=='-';int x=c^48;
while(isdigit(c=getchar())){x=(((x<<2)+x)<<1)+(c^48);}return f?-x:x;
}template<typename G>
void write(G x){
if(x<0) putchar('-'),write(-x);
else if(x<=9) putchar('0'+x);
else write(x/10),putchar('0'+x%10);
}constexpr int inf = 0x3f3f3f3f3f3f3f3f;
constexpr int N = 1012345;
bool ST;int Tt;
int s[N],p[N],c[N],d[N];
int n,L,R;
double ans;
inline int ask(int *c,int l,int r){return c[r]-c[l];}
void Solve(){
n=rd(),L=rd(),R=rd();For(i,1,n) s[i]=rd();For(i,1,n) p[i]=rd();
For(i,1,n) c[i] = c[i-1] + s[i]*p[i];
For(i,1,n) d[i] = d[i-1] + s[i];
For(i,1,n) For(j,i,n-1){
if(ask(c,i,j)>R || ask(c,i-1,j+1)<L) continue;
double tmp=ask(c,i,j), len=ask(d,i,j), rou=len ? tmp/len : 0;
if(min(p[i], p[j+1]) >= rou){
if(ask(c,i-1,j+1) <= R){
tmp = ask(c,i-1,j+1);
len = ask(d,i-1,j+1);
rou = tmp/len;
}else if(p[i] > p[j+1]){
if(ask(c,i-1,j) < R){
tmp = ask(c,i-1,j);
len = ask(d,i-1,j);
len += (R-tmp)/p[j+1];
tmp = R, rou=tmp/len;
}else{
len += (R-tmp)/p[i];
tmp = R, rou=tmp/len;
}
}else{
if(ask(c,i,j+1) < R){
tmp = ask(c,i,j+1);
len = ask(d,i,j+1);
len += (R-tmp)/p[i];
tmp = R, rou=tmp/len;
}else{
len += (R-tmp)/p[j+1];
tmp = R, rou=tmp/len;
}
}
}else if(max(p[i], p[j+1]) < rou){
if(p[i] > p[j+1]){
if(ask(c,i-1,j) < L){
tmp = ask(c,i-1,j);
len = ask(d,i-1,j);
len += (L-tmp)/p[j+1];
tmp = L, rou=tmp/len;
}else if(tmp < L){
len += (L-tmp)/p[i];
tmp = L, rou=tmp/len;
}
}else{
if(ask(c,i,j+1) < L){
tmp = ask(c,i,j+1);
len = ask(d,i,j+1);
len += (L-tmp)/p[i];
tmp = L, rou=tmp/len;
}else if(tmp < L){
len += (L-tmp)/p[j+1];
tmp = L, rou=tmp/len;
}
}
}else if(p[i] >= rou){
if(ask(c,i-1,j) < R){
tmp = ask(c,i-1,j);
len = ask(d,i-1,j);
if(tmp < L){
len += (L-tmp)/p[j+1];
tmp = L, rou=tmp/len;
}
}else{
len += (R-tmp)/p[i];
tmp = R, rou=tmp/len;
}
}else if(p[j+1] >= rou){
if(ask(c,i,j+1) < R){
tmp = ask(c,i,j+1);
len = ask(d,i,j+1);
if(tmp < L){
len += (L-tmp)/p[i];
tmp = L, rou=tmp/len;
}
}else{
len += (R-tmp)/p[j+1];
tmp = R, rou=tmp/len;
}
}
if(rou > ans) ans = rou;
}printf("%.10Lf\n",ans);
}
bool ED;
signed main(){
cerr<<abs(&ST-&ED)/1024./1024.<<"MB\n";
freopen("connect.in","r",stdin);
freopen("connect.out","w",stdout);
Tt=1;double Tim=clock();
while(Tt--) Solve();
return cerr<<"TIME:"<<(clock()-Tim)/CLOCKS_PER_SEC,0;
}