結果
問題 | No.133 カードゲーム |
ユーザー |
![]() |
提出日時 | 2015-04-27 23:47:36 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 11 ms / 5,000 ms |
コード長 | 390 bytes |
コンパイル時間 | 286 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,528 KB |
最終ジャッジ日時 | 2024-06-25 03:29:56 |
合計ジャッジ時間 | 1,275 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 19 |
ソースコード
import itertoolsN=int(raw_input())A=map(int,raw_input().split())B=map(int,raw_input().split())A.sort()tot=0ans=0.0for curA in itertools.permutations(A):awin=0bwin=0tot+=1#print curAfor i in range(N):if curA[i]>B[i]:awin+=1if curA[i]<B[i]:bwin+=1#print awin,bwinif awin>bwin:ans+=1print ans/tot