#include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector VI; typedef vector VVI; #define REP(i, n) for(int(i)=0;(i)<(n);++(i)) #define FOR(i, f, t) for(int(i)=(f);(i)<(t);(++i)) #define EACH(it, c) for(auto it=(c).begin();it!=(c).end();++it) int N; double P[2]; int a[22],b[22]; int res = 0; double p[2][1<<21]; // p[a/b][使用済みカード状態ビット] = 確率 double q[2][22][22]; // q[a/b][i番目のカードを][j回目に出す] = 確率 VI pc[22]; int main(){ do { cin.tie(0); ios_base::sync_with_stdio(false); } while(0); cin >> N >> P[0] >> P[1]; REP(i,N) cin >> a[i]; sort(a,a+N); REP(i,N) cin >> b[i]; sort(b,b+N); REP(i,1<>k)&1) continue; if(i < N-1){ if(first){ first = false; double pp = p[t][j] * P[t]; // 最小値が選ばれる確率 p[t][j|(1< b[bi]){ int score = a[ai]+b[bi]; res += score * q[0][ai][i] * q[1][bi][i]; } } } } cout << fixed << setprecision(15) << res << endl; return 0; }