結果

問題 No.2615 ペアの作り方
ユーザー 👑 KA37RIKA37RI
提出日時 2024-01-27 07:16:02
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 261 bytes
コンパイル時間 310 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 98,020 KB
最終ジャッジ日時 2024-09-28 09:34:16
合計ジャッジ時間 5,424 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

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):
	cnt += c
	
m = 998244353
a = math.factorial(cnt)
a %= m
b = math.factorial(n - cnt)
b %= m

print(a * b % m)
0