import sys sys.setrecursionlimit(10 ** 6) from bisect import * from collections import * from heapq import * int1 = lambda x: int(x) - 1 p2D = lambda x: print(*x, sep="\n") def II(): return int(sys.stdin.readline()) def SI(): return sys.stdin.readline()[:-1] def MI(): return map(int, sys.stdin.readline().split()) def MI1(): return map(int1, sys.stdin.readline().split()) def MF(): return map(float, sys.stdin.readline().split()) def LI(): return list(map(int, sys.stdin.readline().split())) def LI1(): return list(map(int1, sys.stdin.readline().split())) def LF(): return list(map(float, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] dij = [(0, 1), (1, 0), (0, -1), (-1, 0)] from random import * def main(): def game(xx,yy,sx=0,sy=0): m=len(xx) if m==1: if xx[0]>yy[0]:return sx+xx[0]+yy[0]>sy else:return sx>sy+xx[0]+yy[0] if randrange(1000)yy[j]:return game(xx[:i]+xx[i+1:],yy[:j]+yy[j+1:],sx+xx[i]+yy[j],sy) else:return game(xx[:i]+xx[i+1:],yy[:j]+yy[j+1:],sx,sy+xx[i]+yy[j]) n,pa,pb=input().split() pa=int(pa[2:]) pb=int(pb[2:]) aa=LI() bb=LI() aa.sort() bb.sort() loop=100000 win=0 for _ in range(loop): if game(aa[:],bb[:]):win+=1 print(win/loop) main()