結果
問題 | No.133 カードゲーム |
ユーザー |
|
提出日時 | 2021-08-02 11:53:54 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 30 ms / 5,000 ms |
コード長 | 316 bytes |
コンパイル時間 | 376 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-16 14:38:16 |
合計ジャッジ時間 | 1,843 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 19 |
ソースコード
from itertools import permutationsN = int(input())A = list(map(int, input().split()))B = list(map(int, input().split()))game, win = 0, 0for X in permutations(B, N):game += 1cnt = 0for a, b in zip(A, X):if a > b:cnt += 1if 2*cnt > N:win += 1print(win/game)