結果

問題 No.1749 ラムドスウイルスの感染拡大
ユーザー lllllll88938494lllllll88938494
提出日時 2022-05-30 14:38:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 371 bytes
コンパイル時間 165 ms
コンパイル使用メモリ 81,848 KB
実行使用メモリ 83,524 KB
最終ジャッジ日時 2023-10-21 00:21:40
合計ジャッジ時間 4,087 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,496 KB
testcase_01 AC 34 ms
53,496 KB
testcase_02 AC 33 ms
53,496 KB
testcase_03 AC 35 ms
53,496 KB
testcase_04 AC 77 ms
70,508 KB
testcase_05 AC 35 ms
53,496 KB
testcase_06 AC 43 ms
62,252 KB
testcase_07 AC 43 ms
62,252 KB
testcase_08 AC 35 ms
53,496 KB
testcase_09 AC 38 ms
59,484 KB
testcase_10 AC 48 ms
68,260 KB
testcase_11 AC 46 ms
68,260 KB
testcase_12 AC 116 ms
83,524 KB
testcase_13 AC 44 ms
62,244 KB
testcase_14 AC 52 ms
66,072 KB
testcase_15 AC 57 ms
66,072 KB
testcase_16 AC 61 ms
68,460 KB
testcase_17 AC 88 ms
77,888 KB
testcase_18 AC 122 ms
82,552 KB
testcase_19 AC 114 ms
81,264 KB
testcase_20 AC 49 ms
66,400 KB
testcase_21 AC 49 ms
66,392 KB
testcase_22 AC 37 ms
53,496 KB
testcase_23 AC 41 ms
59,776 KB
testcase_24 AC 42 ms
59,788 KB
testcase_25 AC 52 ms
70,464 KB
testcase_26 AC 49 ms
66,404 KB
testcase_27 AC 47 ms
64,068 KB
testcase_28 AC 73 ms
70,508 KB
testcase_29 AC 75 ms
68,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,t=map(int,input().split())
s=[set() for i in range(n)]
for i in range(m):
    x,y=map(int,input().split())
    s[x].add(y)
    s[y].add(x)
    
dp=[[0]*n for i in range(t+1)]
dp[0][0]=1
mod=998244353 

for i in range(1,t+1):
    for j in range(n):
        for k in s[j]:
            dp[i][j] += dp[i-1][k]
            dp[i][j] %= mod
            
print(dp[-1][0]%mod)
0