結果

問題 No.1749 ラムドスウイルスの感染拡大
ユーザー SidewaysOwlSidewaysOwl
提出日時 2021-11-19 21:53:13
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 402 bytes
コンパイル時間 373 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 76,416 KB
最終ジャッジ日時 2024-06-10 08:42:06
合計ジャッジ時間 2,523 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
52,096 KB
testcase_01 AC 33 ms
52,096 KB
testcase_02 AC 32 ms
51,968 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 35 ms
52,352 KB
testcase_07 WA -
testcase_08 AC 32 ms
52,480 KB
testcase_09 WA -
testcase_10 AC 31 ms
52,480 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 87 ms
76,288 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 39 ms
58,752 KB
testcase_24 WA -
testcase_25 AC 58 ms
76,160 KB
testcase_26 AC 72 ms
76,160 KB
testcase_27 AC 61 ms
76,032 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
#     print(new_rmd)
    rmd = new_rmd[::]
print(rmd[0])
0