結果
問題 | No.133 カードゲーム |
ユーザー |
![]() |
提出日時 | 2023-01-08 20:30:54 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 44 ms / 5,000 ms |
コード長 | 373 bytes |
コンパイル時間 | 398 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 60,416 KB |
最終ジャッジ日時 | 2024-12-16 00:00:52 |
合計ジャッジ時間 | 1,974 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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 = 0for a in permutations(A):for b in permutations(B):cnt = 0for i in range(N):if a[i] > b[i]:cnt += 1if cnt * 2 > N:ans += 1for i in range(1, N + 1):ans /= i * iprint(ans)