結果

問題 No.1749 ラムドスウイルスの感染拡大
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2021-11-19 22:47:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 89 ms / 2,000 ms
コード長 402 bytes
コンパイル時間 455 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 76,528 KB
最終ジャッジ日時 2023-08-30 09:41:02
合計ジャッジ時間 4,597 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,164 KB
testcase_01 AC 72 ms
71,396 KB
testcase_02 AC 69 ms
71,384 KB
testcase_03 AC 71 ms
71,348 KB
testcase_04 AC 89 ms
76,288 KB
testcase_05 AC 73 ms
71,372 KB
testcase_06 AC 72 ms
71,580 KB
testcase_07 AC 71 ms
71,276 KB
testcase_08 AC 71 ms
71,160 KB
testcase_09 AC 71 ms
71,436 KB
testcase_10 AC 74 ms
71,344 KB
testcase_11 AC 72 ms
71,328 KB
testcase_12 AC 88 ms
76,228 KB
testcase_13 AC 76 ms
76,476 KB
testcase_14 AC 76 ms
76,224 KB
testcase_15 AC 81 ms
76,164 KB
testcase_16 AC 82 ms
76,344 KB
testcase_17 AC 85 ms
76,248 KB
testcase_18 AC 87 ms
76,528 KB
testcase_19 AC 87 ms
76,248 KB
testcase_20 AC 77 ms
76,264 KB
testcase_21 AC 75 ms
76,272 KB
testcase_22 AC 71 ms
71,388 KB
testcase_23 AC 69 ms
71,368 KB
testcase_24 AC 73 ms
76,288 KB
testcase_25 AC 78 ms
76,404 KB
testcase_26 AC 77 ms
76,416 KB
testcase_27 AC 75 ms
76,148 KB
testcase_28 AC 88 ms
76,240 KB
testcase_29 AC 88 ms
76,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

"""

import sys
from sys import stdin

N,M,T = map(int,stdin.readline().split())

uv = []

for i in range(M):
    u,v = map(int,stdin.readline().split())
    uv.append( (u,v) )

mod = 998244353
dp = [0] * N
dp[0] = 1

for i in range(T):

    ndp = [0] * N

    for u,v in uv:
        ndp[u] += dp[v]
        ndp[v] += dp[u]
        ndp[u] %= mod
        ndp[v] %= mod

    dp = ndp

print (dp[0])
0