結果
| 問題 | No.133 カードゲーム |
| コンテスト | |
| ユーザー |
brthyyjp
|
| 提出日時 | 2020-03-12 02:02:02 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 27 ms / 5,000 ms |
| + 943µs | |
| コード長 | 381 bytes |
| 記録 | |
| コンパイル時間 | 60 ms |
| コンパイル使用メモリ | 82,000 KB |
| 実行使用メモリ | 64,796 KB |
| 最終ジャッジ日時 | 2026-09-24 03:00:25 |
| 合計ジャッジ時間 | 3,226 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 |
ソースコード
n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
import itertools
ans = 0
for a in itertools.permutations(A, n):
for b in itertools.permutations(B, n):
w = 0
for i in range(n):
if a[i] > b[i]:
w += 1
if w > n-w:
ans += 1
import math
ans /= math.factorial(n)**2
print(ans)
brthyyjp