結果
| 問題 | No.133 カードゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-02-06 20:17:43 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 36 ms / 5,000 ms |
| コード長 | 299 bytes |
| 記録 | |
| コンパイル時間 | 138 ms |
| コンパイル使用メモリ | 85,248 KB |
| 実行使用メモリ | 62,080 KB |
| 最終ジャッジ日時 | 2026-03-26 05:22:18 |
| 合計ジャッジ時間 | 1,832 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 |
ソースコード
from itertools import permutations
N = int(input())
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
aw = 0
tn = 0
for permA in permutations(A):
for permB in permutations(B):
tn += 1
aw += sum(permA[i]>permB[i] for i in range(N)) > N//2
print(aw / tn)