結果
問題 |
No.2615 ペアの作り方
|
ユーザー |
![]() |
提出日時 | 2024-01-26 21:47:21 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 145 ms / 2,000 ms |
コード長 | 288 bytes |
コンパイル時間 | 187 ms |
コンパイル使用メモリ | 82,400 KB |
実行使用メモリ | 116,476 KB |
最終ジャッジ日時 | 2024-09-28 07:59:17 |
合計ジャッジ時間 | 2,481 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
N = int(input()) X = list(map(int, input().split())) Y = list(map(int, input().split())) mod = 998244353 P = [1] for i in range(1,N+1): P.append(P[-1]*i%mod) SX = set(X) XYH = sorted(X+Y)[:N] x_cnt = 0 for xyh in XYH: if xyh in SX: x_cnt+=1 print(P[x_cnt]*P[N-x_cnt]%mod)