結果

問題 No.1749 ラムドスウイルスの感染拡大
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-11-19 22:41:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 107 ms / 2,000 ms
コード長 305 bytes
コンパイル時間 1,217 ms
コンパイル使用メモリ 87,256 KB
実行使用メモリ 77,328 KB
最終ジャッジ日時 2023-08-30 09:32:06
合計ジャッジ時間 4,263 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,632 KB
testcase_01 AC 73 ms
71,560 KB
testcase_02 AC 73 ms
71,376 KB
testcase_03 AC 71 ms
71,424 KB
testcase_04 AC 107 ms
76,744 KB
testcase_05 AC 73 ms
71,564 KB
testcase_06 AC 74 ms
71,136 KB
testcase_07 AC 73 ms
71,580 KB
testcase_08 AC 70 ms
71,572 KB
testcase_09 AC 72 ms
71,228 KB
testcase_10 AC 73 ms
71,320 KB
testcase_11 AC 74 ms
71,360 KB
testcase_12 AC 107 ms
77,328 KB
testcase_13 AC 80 ms
76,468 KB
testcase_14 AC 91 ms
76,476 KB
testcase_15 AC 95 ms
76,692 KB
testcase_16 AC 98 ms
76,816 KB
testcase_17 AC 105 ms
76,748 KB
testcase_18 AC 106 ms
76,876 KB
testcase_19 AC 105 ms
76,804 KB
testcase_20 AC 77 ms
76,200 KB
testcase_21 AC 77 ms
76,292 KB
testcase_22 AC 72 ms
71,480 KB
testcase_23 AC 71 ms
71,356 KB
testcase_24 AC 78 ms
76,268 KB
testcase_25 AC 80 ms
76,388 KB
testcase_26 AC 78 ms
76,336 KB
testcase_27 AC 78 ms
76,204 KB
testcase_28 AC 106 ms
76,536 KB
testcase_29 AC 105 ms
76,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,t = map(int,input().split())
mod = 998244353
edge = [[int(x) for x in input().split()] for i in range(m)]

dp = [0]*n
dp[0] = 1
for i in range(t):
    ndp = [0]*n
    for u,v in edge:
        ndp[u] += dp[v]
        ndp[u] %= mod
        ndp[v] += dp[u]
        ndp[v] %= mod
    dp = ndp
print(dp[0])
0