結果

問題 No.1749 ラムドスウイルスの感染拡大
ユーザー NatsubiSoganNatsubiSogan
提出日時 2021-11-19 23:21:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 222 ms / 2,000 ms
コード長 361 bytes
コンパイル時間 1,443 ms
コンパイル使用メモリ 86,808 KB
実行使用メモリ 78,224 KB
最終ジャッジ日時 2023-08-30 10:35:41
合計ジャッジ時間 6,430 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
71,584 KB
testcase_01 AC 84 ms
71,432 KB
testcase_02 AC 85 ms
71,516 KB
testcase_03 AC 86 ms
71,420 KB
testcase_04 AC 171 ms
77,936 KB
testcase_05 AC 84 ms
71,436 KB
testcase_06 AC 106 ms
78,188 KB
testcase_07 AC 107 ms
78,224 KB
testcase_08 AC 85 ms
71,516 KB
testcase_09 AC 92 ms
76,484 KB
testcase_10 AC 176 ms
77,836 KB
testcase_11 AC 178 ms
77,844 KB
testcase_12 AC 222 ms
78,176 KB
testcase_13 AC 105 ms
77,556 KB
testcase_14 AC 110 ms
77,588 KB
testcase_15 AC 117 ms
77,672 KB
testcase_16 AC 125 ms
77,936 KB
testcase_17 AC 157 ms
78,024 KB
testcase_18 AC 222 ms
78,116 KB
testcase_19 AC 199 ms
78,184 KB
testcase_20 AC 114 ms
77,808 KB
testcase_21 AC 115 ms
77,848 KB
testcase_22 AC 88 ms
71,384 KB
testcase_23 AC 100 ms
76,452 KB
testcase_24 AC 96 ms
76,380 KB
testcase_25 AC 160 ms
77,892 KB
testcase_26 AC 129 ms
77,900 KB
testcase_27 AC 113 ms
77,416 KB
testcase_28 AC 134 ms
77,940 KB
testcase_29 AC 135 ms
78,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, t = map(int, input().split())
G = [[] for i in range(n)]
for _ in range(m):
	a, b = map(int, input().split())
	G[a].append(b)
	G[b].append(a)
cnt = [0] * n
cnt[0] = 1
mod = 998244353
from copy import deepcopy
for _ in range(t):
	ncnt = [0] * n
	for i in range(n):
		for v in G[i]:
			ncnt[i] += cnt[v]
			ncnt[i] %= mod
	cnt = deepcopy(ncnt)
print(cnt[0])
0