結果
| 問題 | No.133 カードゲーム |
| コンテスト | |
| ユーザー |
tomtakeno
|
| 提出日時 | 2022-02-26 10:51:55 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 92 ms / 5,000 ms |
| + 855µs | |
| コード長 | 306 bytes |
| 記録 | |
| コンパイル時間 | 279 ms |
| コンパイル使用メモリ | 21,544 KB |
| 実行使用メモリ | 15,868 KB |
| 最終ジャッジ日時 | 2026-08-06 03:34:06 |
| 合計ジャッジ時間 | 4,015 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 |
ソースコード
from itertools import permutations n = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) t, win = 0, 0 for a in permutations(A): for b in permutations(B): cnt = 0 t += 1 for ai, bi in zip(a, b): if bi < ai: cnt += 1 if len(b)/2 < cnt: win += 1 print(win/t)
tomtakeno