結果

問題 No.1749 ラムドスウイルスの感染拡大
ユーザー stngstng
提出日時 2022-05-15 13:31:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 375 bytes
コンパイル時間 415 ms
コンパイル使用メモリ 87,192 KB
実行使用メモリ 77,336 KB
最終ジャッジ日時 2023-10-09 21:50:21
合計ジャッジ時間 5,164 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
71,068 KB
testcase_01 AC 67 ms
71,024 KB
testcase_02 AC 66 ms
71,336 KB
testcase_03 AC 67 ms
71,300 KB
testcase_04 AC 94 ms
76,476 KB
testcase_05 AC 64 ms
71,428 KB
testcase_06 AC 75 ms
76,540 KB
testcase_07 AC 72 ms
75,980 KB
testcase_08 AC 66 ms
71,092 KB
testcase_09 AC 69 ms
75,628 KB
testcase_10 AC 80 ms
76,828 KB
testcase_11 AC 78 ms
76,924 KB
testcase_12 AC 114 ms
76,996 KB
testcase_13 AC 72 ms
76,416 KB
testcase_14 AC 85 ms
76,012 KB
testcase_15 AC 87 ms
76,096 KB
testcase_16 AC 88 ms
76,680 KB
testcase_17 AC 100 ms
77,132 KB
testcase_18 AC 115 ms
77,092 KB
testcase_19 AC 114 ms
77,336 KB
testcase_20 AC 76 ms
76,508 KB
testcase_21 AC 75 ms
76,508 KB
testcase_22 AC 64 ms
71,232 KB
testcase_23 AC 70 ms
75,812 KB
testcase_24 AC 71 ms
75,996 KB
testcase_25 AC 78 ms
76,976 KB
testcase_26 AC 76 ms
76,596 KB
testcase_27 AC 73 ms
76,136 KB
testcase_28 AC 98 ms
76,116 KB
testcase_29 AC 91 ms
76,564 KB
権限があれば一括ダウンロードができます

ソースコード

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