結果
| 問題 |
No.2615 ペアの作り方
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-01-27 20:32:47 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 562 ms / 2,000 ms |
| コード長 | 447 bytes |
| コンパイル時間 | 361 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 103,724 KB |
| 最終ジャッジ日時 | 2024-09-28 09:48:45 |
| 合計ジャッジ時間 | 5,585 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline
N = int(input())
X = list(map(int,input().split()))
Y = list(map(int,input().split()))
mod = 998244353
Z = [(x,1) for x in X] + [(y,0) for y in Y]
Z.sort()
n = sum(flg for x,flg in Z[:N])
m = N - n
ans = 1
for i in range(1,n+1):
ans = (ans*i)%mod
for i in range(1,m+1):
ans = (ans*i)%mod
print(ans)