結果
| 問題 | No.133 カードゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-27 09:52:03 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 92 ms / 5,000 ms |
| + 7µs | |
| コード長 | 343 bytes |
| 記録 | |
| コンパイル時間 | 279 ms |
| コンパイル使用メモリ | 21,152 KB |
| 実行使用メモリ | 15,868 KB |
| 最終ジャッジ日時 | 2026-08-07 16:26:18 |
| 合計ジャッジ時間 | 4,458 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 |
ソースコード
# https://yukicoder.me/problems/199
from itertools import *
from math import factorial
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
cnt = 0
for b in permutations(B,N):
res = [1 if A[i] > b[i] else 0 for i in range(N)]
if sum(res) > N//2:
cnt += 1
f = factorial(N)
print(cnt/f)