<>; @A=glob<>; @B=glob<>; print grep({@B[@C[1,0]]=@B[@C=(rand@B,rand@B)]; (grep$_>$B[$i++%@B],@A)>@A/2}1..1e5)/1e5