結果
問題 | No.2615 ペアの作り方 |
ユーザー |
![]() |
提出日時 | 2024-01-26 21:34:10 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 561 ms / 2,000 ms |
コード長 | 343 bytes |
コンパイル時間 | 284 ms |
コンパイル使用メモリ | 82,476 KB |
実行使用メモリ | 128,044 KB |
最終ジャッジ日時 | 2024-09-28 07:44:50 |
合計ジャッジ時間 | 5,106 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
N=int(input())X=list(map(int, input().split()))Y=list(map(int, input().split()))Z=[]for i in range(N):Z.append((X[i],1,i))Z.append((Y[i],2,i))Z=sorted(Z)x,y=0,0for _ ,a,i in Z[:N]:if a==1:x+=1else:y+=1D=[1]mod=998244353for i in range(1,10**5+10):D.append(D[-1]*i)D[-1]%=modans=D[x]*D[y]%modprint(ans)