#include <bits/stdc++.h>
using namespace std;
int n;
double pa,pb;
int tries=0,scs=0;
bool game(vector<int> a,vector<int> b){
	int ap=0,bp=0;
	while(a.size()>0){
		int aa,bb;
		if(rand()%1000<pa*1000||a.size()==1)	aa=0;
		else 	aa=1+rand()%((int)a.size()-1);
		if(rand()%1000<pb*1000||b.size()==1)	bb=0;
		else 	bb=1+rand()%((int)b.size()-1);
		if(a[aa]>b[bb])	ap+=a[aa]+b[bb];
		else 	bp+=a[aa]+b[bb];
		a.erase(a.begin()+aa);	b.erase(b.begin()+bb);
	}
	if(ap>bp)	return true;
	else return false;
}
	
int main(){
	cin>>n>>pa>>pb;
	vector<int> a(n),b(n);
	for(int i=0;i<n;i++)	cin>>a[i];
	for(int i=0;i<n;i++)	cin>>b[i];
	sort(a.begin(),a.end());	sort(b.begin(),b.end());
	auto start=time(NULL);
	while(time(NULL)-start<2){
		tries++;
		if(game(a,b))	scs++;
	}
	cout<<(double)scs/tries<<endl;
	return 0;
}