結果

問題 No.1749 ラムドスウイルスの感染拡大
ユーザー SidewaysOwlSidewaysOwl
提出日時 2021-11-19 21:54:44
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 402 bytes
コンパイル時間 383 ms
コンパイル使用メモリ 87,164 KB
実行使用メモリ 77,360 KB
最終ジャッジ日時 2023-08-30 08:17:11
合計ジャッジ時間 4,337 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,164 KB
testcase_01 AC 74 ms
71,320 KB
testcase_02 AC 70 ms
71,268 KB
testcase_03 AC 69 ms
71,164 KB
testcase_04 AC 97 ms
76,812 KB
testcase_05 AC 69 ms
71,180 KB
testcase_06 AC 75 ms
76,616 KB
testcase_07 AC 76 ms
76,640 KB
testcase_08 AC 69 ms
71,368 KB
testcase_09 AC 71 ms
75,668 KB
testcase_10 AC 82 ms
77,084 KB
testcase_11 AC 82 ms
77,144 KB
testcase_12 AC 120 ms
77,252 KB
testcase_13 AC 76 ms
76,680 KB
testcase_14 AC 88 ms
76,552 KB
testcase_15 AC 89 ms
76,520 KB
testcase_16 AC 92 ms
76,664 KB
testcase_17 AC 104 ms
77,324 KB
testcase_18 AC 120 ms
77,360 KB
testcase_19 AC 119 ms
77,268 KB
testcase_20 AC 83 ms
76,764 KB
testcase_21 AC 80 ms
76,712 KB
testcase_22 AC 69 ms
71,484 KB
testcase_23 AC 74 ms
76,148 KB
testcase_24 AC 76 ms
76,064 KB
testcase_25 AC 87 ms
77,096 KB
testcase_26 AC 84 ms
76,700 KB
testcase_27 AC 80 ms
76,312 KB
testcase_28 AC 98 ms
76,788 KB
testcase_29 AC 96 ms
76,880 KB
権限があれば一括ダウンロードができます

ソースコード

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
#     print(new_rmd)
    rmd = new_rmd[::]
print(rmd[0])
0