結果

問題 No.2615 ペアの作り方
ユーザー sasa8uyauyasasa8uyauya
提出日時 2024-01-26 22:56:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 631 ms / 2,000 ms
コード長 259 bytes
コンパイル時間 447 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 111,152 KB
最終ジャッジ日時 2024-01-26 22:56:56
合計ジャッジ時間 5,713 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,460 KB
testcase_01 AC 37 ms
53,460 KB
testcase_02 AC 37 ms
53,460 KB
testcase_03 AC 37 ms
53,460 KB
testcase_04 AC 37 ms
53,460 KB
testcase_05 AC 37 ms
53,460 KB
testcase_06 AC 37 ms
53,460 KB
testcase_07 AC 38 ms
53,460 KB
testcase_08 AC 38 ms
53,460 KB
testcase_09 AC 45 ms
61,556 KB
testcase_10 AC 45 ms
61,556 KB
testcase_11 AC 45 ms
61,556 KB
testcase_12 AC 45 ms
61,556 KB
testcase_13 AC 44 ms
61,556 KB
testcase_14 AC 45 ms
61,556 KB
testcase_15 AC 631 ms
110,636 KB
testcase_16 AC 602 ms
110,636 KB
testcase_17 AC 616 ms
110,684 KB
testcase_18 AC 620 ms
111,152 KB
testcase_19 AC 592 ms
110,636 KB
testcase_20 AC 595 ms
110,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

M=998244353
n=int(input())
f=[1]
for i in range(1,n+1):
  f+=[f[-1]*i%M]
x=list(map(int,input().split()))
y=list(map(int,input().split()))
z=[]
for i in range(n):
  z+=[(x[i],0)]
  z+=[(y[i],1)]
z.sort()
c=sum(z[i][1] for i in range(n))
print((f[c]*f[n-c])%M)
0