結果
| 問題 | No.133 カードゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-16 12:32:01 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
AC
|
| 実行時間 | 61 ms / 5,000 ms |
| + 504µs | |
| コード長 | 384 bytes |
| 記録 | |
| コンパイル時間 | 69 ms |
| コンパイル使用メモリ | 81,280 KB |
| 実行使用メモリ | 82,176 KB |
| 最終ジャッジ日時 | 2026-07-18 12:03:43 |
| 合計ジャッジ時間 | 3,018 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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))