結果

問題 No.133 カードゲーム
ユーザー 中土洋平
提出日時 2020-10-02 10:45:25
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 446 bytes
コンパイル時間 226 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-08 03:39:18
合計ジャッジ時間 1,945 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 2
other AC * 1 WA * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools

n = int(input())
a = list(input().split())
b = list(input().split())
game = 0
wina = 0
for i in itertools.permutations(a, n):
    for j in itertools.permutations(b, n):
        for k in range(n):
            win = 0
            lose = 0
            if i[k] > j[k]:
                win += 1
            elif i[k] < j[k]:
                lose += 1
        game += 1
        if win > lose:
            wina += 1

print(wina / game)
0