結果
問題 | No.2615 ペアの作り方 |
ユーザー |
![]() |
提出日時 | 2024-01-26 21:29:59 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 553 ms / 2,000 ms |
コード長 | 291 bytes |
コンパイル時間 | 190 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 100,172 KB |
最終ジャッジ日時 | 2024-09-28 07:42:00 |
合計ジャッジ時間 | 5,168 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
N=int(input())X=list(map(int,input().split()))Y=list(map(int,input().split()))Z=[(x,0) for x in X]+[(y,1) for y in Y]Z.sort()count=0for i in range(N):if Z[i][1]==1:count+=1fr=[1]p=998244353for i in range(1,N+1):fr.append(fr[-1]*i%p)print(fr[count]*fr[N-count]%p)