結果
| 問題 | No.133 カードゲーム |
| コンテスト | |
| ユーザー |
rlangevin
|
| 提出日時 | 2023-01-08 20:30:54 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 46 ms / 5,000 ms |
| コード長 | 373 bytes |
| 記録 | |
| コンパイル時間 | 358 ms |
| コンパイル使用メモリ | 85,248 KB |
| 実行使用メモリ | 60,544 KB |
| 最終ジャッジ日時 | 2026-05-26 06:21:37 |
| 合計ジャッジ時間 | 2,262 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 |
ソースコード
from itertools import *
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
ans = 0
for a in permutations(A):
for b in permutations(B):
cnt = 0
for i in range(N):
if a[i] > b[i]:
cnt += 1
if cnt * 2 > N:
ans += 1
for i in range(1, N + 1):
ans /= i * i
print(ans)
rlangevin