結果
問題 | No.2615 ペアの作り方 |
ユーザー |
👑 |
提出日時 | 2024-01-27 07:24:21 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 477 ms / 2,000 ms |
コード長 | 265 bytes |
コンパイル時間 | 89 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 38,612 KB |
最終ジャッジ日時 | 2024-09-28 09:34:34 |
合計ジャッジ時間 | 4,105 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
import math n = int(input()) x = [(int(z), 0) for z in input().split()] y = [(int(z), 1) for z in input().split()] cnt = 0 for _, c in sorted(x + y)[:n]: cnt += c m = 998244353 a = math.factorial(cnt) a %= m b = math.factorial(n - cnt) b %= m print(a * b % m)