結果
| 問題 | No.133 カードゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-29 15:21:59 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 93 ms / 5,000 ms |
| + 458µs | |
| コード長 | 364 bytes |
| 記録 | |
| コンパイル時間 | 288 ms |
| コンパイル使用メモリ | 21,408 KB |
| 実行使用メモリ | 15,864 KB |
| 最終ジャッジ日時 | 2026-07-30 00:17:17 |
| 合計ジャッジ時間 | 4,135 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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()))
aw = 0
x = 0
for pa in permutations(A):
for pb in permutations(B):
x += 1
ac = 0
for i in range(N):
if pa[i] > pb[i]:
ac += 1
if ac > N//2:
aw += 1
print(aw/x)