結果

問題 No.2615 ペアの作り方
ユーザー 👑 rin204rin204
提出日時 2024-01-26 21:22:44
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 307 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 98,068 KB
最終ジャッジ日時 2024-01-26 21:22:50
合計ジャッジ時間 2,594 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,460 KB
testcase_01 AC 36 ms
53,460 KB
testcase_02 AC 38 ms
53,460 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 37 ms
53,460 KB
testcase_07 AC 38 ms
53,460 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 40 ms
59,448 KB
testcase_13 AC 41 ms
59,448 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 125 ms
97,912 KB
testcase_19 AC 130 ms
97,288 KB
testcase_20 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353

n = int(input())
X = list(map(int, input().split()))
Y = list(map(int, input().split()))
Z = X[:] + Y[:]
Z.sort()
z = Z[n - 1]
x = sum(x < z for x in X)
ans = 1
for i in range(1, x + 1):
    ans *= i
    ans %= MOD
x = n - x
for i in range(1, x + 1):
    ans *= i
    ans %= MOD
print(ans)
0