結果
| 問題 |
No.2615 ペアの作り方
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-01-26 21:34:04 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 346 bytes |
| コンパイル時間 | 1,984 ms |
| コンパイル使用メモリ | 76,572 KB |
| 実行使用メモリ | 90,120 KB |
| 最終ジャッジ日時 | 2024-09-28 07:44:42 |
| 合計ジャッジ時間 | 4,657 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 21 |
ソースコード
N = int(input())
X = list(map(int,input().split()))
Y = list(map(int,input().split()))
X = [(x,"X") for x in X]
Y = [(y,"Y") for y in Y]
Z = X + Y
Z.sort()
xcount = 0
for x,_ in Z[:N]:
if _=="X":
xcount += 1
fact = [1]*(N+1)
mod = 998244353
for i in range(N):
fact[i+1] = (i+1)*fact[i]%mod
print(fact[xcount]*fact[N-xcount]%mod)