結果
| 問題 |
No.2615 ペアの作り方
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-06-07 19:30:33 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 312 ms / 2,000 ms |
| コード長 | 268 bytes |
| コンパイル時間 | 337 ms |
| コンパイル使用メモリ | 12,160 KB |
| 実行使用メモリ | 25,500 KB |
| 最終ジャッジ日時 | 2025-06-07 19:30:38 |
| 合計ジャッジ時間 | 4,717 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
import math
mod = 998244353
n = int(input())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
x.sort()
y.sort(reverse=True)
k = 0
for i in range(n):
if x[i] <= y[i]:
k += 1
print(math.factorial(k) * math.factorial(n-k) % mod)