結果
| 問題 |
No.133 カードゲーム
|
| コンテスト | |
| ユーザー |
tomtakeno
|
| 提出日時 | 2022-02-26 10:51:55 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 5,000 ms |
| コード長 | 306 bytes |
| コンパイル時間 | 99 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-07-04 06:41:42 |
| 合計ジャッジ時間 | 1,521 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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