結果
| 問題 | No.133 カードゲーム | 
| コンテスト | |
| ユーザー |  yayo256 | 
| 提出日時 | 2018-11-21 15:20:27 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 316 bytes | 
| コンパイル時間 | 199 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-12-24 16:01:40 | 
| 合計ジャッジ時間 | 1,696 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 4 | 
| other | WA * 19 | 
ソースコード
from itertools import permutations as p
from math import factorial as fact
n = int(input())
a, b = [tuple(map(int, input().split(" "))) for _ in range(2)]
count = 0
for a_i in p(a, n):
	for b_i in p(b, n):
		count += (sum(a_j > b_j for a_j, b_j in zip(a_i, b_i)) / n > 0.5)
	print(count)
print(count / fact(n)**2)
            
            
            
        