結果

問題 No.1749 ラムドスウイルスの感染拡大
ユーザー SidewaysOwlSidewaysOwl
提出日時 2021-11-19 21:45:10
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 379 bytes
コンパイル時間 497 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 77,388 KB
最終ジャッジ日時 2023-08-30 07:57:07
合計ジャッジ時間 4,965 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,204 KB
testcase_01 AC 72 ms
71,304 KB
testcase_02 AC 73 ms
71,368 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 73 ms
71,136 KB
testcase_07 WA -
testcase_08 AC 74 ms
71,312 KB
testcase_09 WA -
testcase_10 AC 73 ms
71,280 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 119 ms
77,156 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 79 ms
76,068 KB
testcase_24 WA -
testcase_25 AC 89 ms
76,628 KB
testcase_26 AC 98 ms
76,740 KB
testcase_27 AC 96 ms
76,580 KB
testcase_28 WA -
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,t = map(int,input().split())
l = [[] for _ in range(n)]
for i in range(m):
    s,t = map(int,input().split())
    l[s].append(t)
    l[t].append(s)
rmd = [0] * n
rmd[0] = 1
for i in range(t):
    new_rmd = [0] * n
    for node in range(n):
        for nd in l[node]:
            new_rmd[nd]  += rmd[node] 
            new_rmd[nd] %= 998244353 
    rmd = new_rmd
print(rmd[0])
0