結果
問題 | No.133 カードゲーム |
ユーザー |
|
提出日時 | 2017-02-16 12:32:01 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 12 ms / 5,000 ms |
コード長 | 384 bytes |
コンパイル時間 | 163 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,400 KB |
最終ジャッジ日時 | 2024-06-25 03:48:23 |
合計ジャッジ時間 | 1,032 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 19 |
ソースコード
#yuki_133import itertoolsdef game(x,y):cnt=0for i in xrange(len(x)):if x[i]>y[i]:cnt+=1else:cnt-=1return cntn=int(raw_input())a=map(int,raw_input().split())b=map(int,raw_input().split())la=list(itertools.permutations(a))lb=list(itertools.permutations(b))cnt2=0for i in la:for j in lb:if game(i,j)>0:cnt2+=1print 1.0*cnt2/(len(la)*len(lb))