結果
| 問題 | No.133 カードゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-16 12:32:01 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 83 ms / 5,000 ms |
| コード長 | 384 bytes |
| 記録 | |
| コンパイル時間 | 155 ms |
| コンパイル使用メモリ | 77,356 KB |
| 最終ジャッジ日時 | 2025-12-03 23:06:07 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 |
ソースコード
#yuki_133 import itertools def game(x,y): cnt=0 for i in xrange(len(x)): if x[i]>y[i]: cnt+=1 else: cnt-=1 return cnt n=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=0 for i in la: for j in lb: if game(i,j)>0: cnt2+=1 print 1.0*cnt2/(len(la)*len(lb))