import random N,Pa,Pb=map(float,raw_input().split()) N=int(N) As=map(int,raw_input().split()) Bs=map(int,raw_input().split()) As.sort() Bs.sort() n_win=0 for i in range(1000000): A=[a for a in As] B=[b for b in Bs] Ascore=0 Bscore=0 for j in range(N): a=A[0] b=B[0] if len(A)==1 or random.random()<=Pa: del A[0] else: ai=random.randint(1,len(A)-1) a=A[ai] del A[ai] if len(B)==1 or random.random()<=Pb: del B[0] else: bi=random.randint(1,len(B)-1) b=B[bi] del B[bi] if a>b: Ascore+=a+b else: Bscore+=a+b if Ascore>Bscore: n_win+=1 print n_win*1.0/1000000