import sys read=sys.stdin.buffer.read readline=sys.stdin.buffer.readline readlines=sys.stdin.buffer.readlines npapb=readline().split() n=int(npapb[0]) pa=float(npapb[1]) pb=float(npapb[2]) a0=list(map(int, readline().split())) b0=list(map(int, readline().split())) a0.sort(reverse=True) b0.sort(reverse=True) cnt=0 import random for _ in range(100000): sa, sb=0, 0 a=a0[:] b=b0[:] for i in range(n): if i==n-1: if a[0]>b[0]: sa+=a[0]+b[0] else: sb+=a[0]+b[0] break ra=random.random() rb=random.random() ia, ib=n-1-i, n-1-i if ra>pa: ia=random.randint(0, n-i-2) if rb>pb: ib=random.randint(0, n-i-2) a1=a[ia] b1=b[ib] if a1>b1: sa+=a1+b1 else: sb+=a1+b1 a.pop(ia) b.pop(ib) if sa>sb: cnt+=1 print(cnt/100000.0)