結果

問題 No.1749 ラムドスウイルスの感染拡大
ユーザー first_vilfirst_vil
提出日時 2021-11-19 21:42:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 114 ms / 2,000 ms
コード長 409 bytes
コンパイル時間 1,180 ms
コンパイル使用メモリ 86,844 KB
実行使用メモリ 77,216 KB
最終ジャッジ日時 2023-08-30 07:52:28
合計ジャッジ時間 4,144 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,464 KB
testcase_01 AC 71 ms
71,360 KB
testcase_02 AC 70 ms
71,132 KB
testcase_03 AC 71 ms
71,188 KB
testcase_04 AC 94 ms
76,644 KB
testcase_05 AC 69 ms
71,088 KB
testcase_06 AC 77 ms
76,512 KB
testcase_07 AC 77 ms
76,552 KB
testcase_08 AC 71 ms
71,492 KB
testcase_09 AC 74 ms
75,916 KB
testcase_10 AC 81 ms
76,580 KB
testcase_11 AC 83 ms
76,556 KB
testcase_12 AC 111 ms
76,756 KB
testcase_13 AC 79 ms
76,556 KB
testcase_14 AC 81 ms
76,024 KB
testcase_15 AC 82 ms
76,204 KB
testcase_16 AC 85 ms
76,308 KB
testcase_17 AC 94 ms
76,620 KB
testcase_18 AC 114 ms
77,216 KB
testcase_19 AC 111 ms
77,096 KB
testcase_20 AC 82 ms
76,376 KB
testcase_21 AC 83 ms
76,680 KB
testcase_22 AC 70 ms
71,448 KB
testcase_23 AC 77 ms
76,084 KB
testcase_24 AC 76 ms
76,160 KB
testcase_25 AC 86 ms
76,196 KB
testcase_26 AC 88 ms
76,468 KB
testcase_27 AC 81 ms
76,232 KB
testcase_28 AC 88 ms
76,660 KB
testcase_29 AC 87 ms
76,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

mod = 998244353

n,m,t = mi()
g = [list() for _ in range(n)]
for _ in range(m):
	a,b = mi()
	g[a].append(b)
	g[b].append(a)

dp = [0]*n
dp[0] = 1
for time in range(t):
	nxt = [0]*n
	for cur in range(n):
		dp[cur] %= mod
		for to in g[cur]:
			nxt[to] += dp[cur]
	dp = nxt
print(dp[0]%mod)
0