結果

問題 No.1989 Pairing Multiset
ユーザー chineristACchineristAC
提出日時 2022-06-24 22:03:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,807 ms / 2,000 ms
コード長 439 bytes
コンパイル時間 378 ms
コンパイル使用メモリ 87,120 KB
実行使用メモリ 79,688 KB
最終ジャッジ日時 2023-08-08 12:21:12
合計ジャッジ時間 23,811 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,800 ms
79,652 KB
testcase_01 AC 1,787 ms
79,396 KB
testcase_02 AC 1,790 ms
79,212 KB
testcase_03 AC 1,801 ms
79,644 KB
testcase_04 AC 99 ms
74,484 KB
testcase_05 AC 1,807 ms
79,684 KB
testcase_06 AC 101 ms
74,660 KB
testcase_07 AC 101 ms
74,976 KB
testcase_08 AC 1,728 ms
79,176 KB
testcase_09 AC 169 ms
79,656 KB
testcase_10 AC 663 ms
79,412 KB
testcase_11 AC 1,151 ms
79,656 KB
testcase_12 AC 1,232 ms
79,688 KB
testcase_13 AC 1,732 ms
79,176 KB
testcase_14 AC 380 ms
79,676 KB
testcase_15 AC 337 ms
79,448 KB
testcase_16 AC 1,535 ms
79,656 KB
testcase_17 AC 224 ms
79,180 KB
testcase_18 AC 99 ms
74,752 KB
testcase_19 AC 316 ms
79,408 KB
testcase_20 AC 1,779 ms
79,560 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys,random,bisect
from collections import deque,defaultdict
from heapq import heapify,heappop,heappush
from itertools import permutations
from math import log,gcd

input = lambda :sys.stdin.readline().rstrip()
mi = lambda :map(int,input().split())
li = lambda :list(mi())

mod = 998244353

N,M = mi()

res = N
for i in range(2*N+1):
    res *= (M+2*N-i) % mod
    res %= mod
    res *= pow(i+1,mod-2,mod)
    res %= mod

print(res)
0