結果

問題 No.133 カードゲーム
ユーザー htkb
提出日時 2018-08-30 09:42:56
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 31 ms / 5,000 ms
コード長 263 bytes
コンパイル時間 157 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-09-13 19:48:38
合計ジャッジ時間 1,593 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import permutations
N = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

result = [sum(1 if _a>_b else -1 if _a<_b else 0 for _a, _b in zip(ap, b)) > 0 for ap in permutations(a)]
print(sum(result) / len(result))
0