結果
| 問題 |
No.133 カードゲーム
|
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2020-12-08 02:15:14 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 52 ms / 5,000 ms |
| コード長 | 284 bytes |
| コンパイル時間 | 240 ms |
| コンパイル使用メモリ | 82,208 KB |
| 実行使用メモリ | 62,428 KB |
| 最終ジャッジ日時 | 2024-09-17 14:17:32 |
| 合計ジャッジ時間 | 2,458 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 |
ソースコード
n = int(input())
*a, = map(int,input().split())
*b, = map(int,input().split())
from itertools import permutations
ans = 0
for pa in permutations(a):
for pb in permutations(b):
if sum(u > v for u,v in zip(pa,pb)) > n//2:
ans += 1
print(ans/([0,1,2,6,24][n]**2))
convexineq