結果

問題 No.1749 ラムドスウイルスの感染拡大
ユーザー DrDrpilotDrDrpilot
提出日時 2022-02-23 12:26:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 140 ms / 2,000 ms
コード長 347 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 87,100 KB
実行使用メモリ 85,060 KB
最終ジャッジ日時 2023-09-14 04:42:26
合計ジャッジ時間 4,288 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,224 KB
testcase_01 AC 75 ms
71,036 KB
testcase_02 AC 76 ms
71,392 KB
testcase_03 AC 75 ms
71,348 KB
testcase_04 AC 112 ms
76,684 KB
testcase_05 AC 74 ms
71,240 KB
testcase_06 AC 80 ms
76,400 KB
testcase_07 AC 79 ms
76,548 KB
testcase_08 AC 75 ms
71,556 KB
testcase_09 AC 75 ms
75,556 KB
testcase_10 AC 82 ms
76,560 KB
testcase_11 AC 84 ms
76,452 KB
testcase_12 AC 138 ms
85,060 KB
testcase_13 AC 81 ms
76,428 KB
testcase_14 AC 94 ms
76,376 KB
testcase_15 AC 97 ms
76,116 KB
testcase_16 AC 103 ms
76,732 KB
testcase_17 AC 123 ms
79,464 KB
testcase_18 AC 140 ms
83,936 KB
testcase_19 AC 139 ms
82,808 KB
testcase_20 AC 85 ms
76,612 KB
testcase_21 AC 86 ms
76,568 KB
testcase_22 AC 75 ms
71,280 KB
testcase_23 AC 79 ms
76,068 KB
testcase_24 AC 78 ms
76,156 KB
testcase_25 AC 88 ms
76,712 KB
testcase_26 AC 90 ms
76,568 KB
testcase_27 AC 86 ms
76,012 KB
testcase_28 AC 113 ms
76,704 KB
testcase_29 AC 111 ms
76,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,T=map(int,input().split())
mod=998244353
g=[[] for _ in range(n)]
for _ in range(m):
    s,t=map(int,input().split())
    g[s].append(t)
    g[t].append(s)
dp=[[0]*n for _ in range(T+1)]
dp[0][0]=1
for i in range(1,T+1):
    for j in range(n):
        for to in g[j]:
            dp[i][j]+=dp[i-1][to]
            dp[i][j]%=mod
print(dp[T][0])
0