結果

問題 No.3793 Multishift
コンテスト
ユーザー hiro1729
提出日時 2026-11-01 15:32:37
言語 PyPy3
(8.0.1 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 545 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 118 ms
コンパイル使用メモリ 64,264 KB
実行使用メモリ 81,632 KB
最終ジャッジ日時 2026-11-06 21:11:50
合計ジャッジ時間 3,026 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 3 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

mod = 998244353

comb = [[0] * (i + 1) for i in range(101)]
comb[0][0] = 1
for i in range(1, 101):
	for j in range(i + 1):
		if j > 0: comb[i][j] += comb[i - 1][j - 1]
		if j < i: comb[i][j] += comb[i - 1][j]
		comb[i][j] %= mod

N, M = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
if N > 100 or M > 100:
	exit(0)
g = [0] * (N + 1)
for i in range(M + 1):
	for j in range(N + 1):
		for k in range(j + 1):
			g[k] += B[i] * A[j] * comb[j][k] * pow(-i, j - k, mod) % mod
			g[k] %= mod
print(*g)
0