結果

問題 No.1749 ラムドスウイルスの感染拡大
ユーザー stng
提出日時 2022-05-15 13:31:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 91 ms / 2,000 ms
コード長 375 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 82,364 KB
実行使用メモリ 76,544 KB
最終ジャッジ日時 2024-07-26 20:11:34
合計ジャッジ時間 3,397 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,T = map(int,input().split())
st = [[] for i in range(n)]
mod = 998244353

for i in range(m):
    s,t = map(int,input().split())
    st[s].append(t)
    st[t].append(s)

ct = [0]*n
ct[0] = 1

for i in range(T):
    nct = [0]*n
    for j in range(n):
        for k in st[j]:
            nct[j] += ct[k]
            nct[j] %= mod
    ct = nct[:]
    #print(ct)

print(ct[0])
0