結果

問題 No.1749 ラムドスウイルスの感染拡大
ユーザー hir355hir355
提出日時 2021-11-19 21:39:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 377 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 87,000 KB
実行使用メモリ 77,388 KB
最終ジャッジ日時 2023-08-30 07:44:26
合計ジャッジ時間 4,584 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,192 KB
testcase_01 AC 72 ms
71,244 KB
testcase_02 AC 70 ms
71,244 KB
testcase_03 AC 70 ms
71,304 KB
testcase_04 AC 107 ms
76,552 KB
testcase_05 AC 73 ms
71,280 KB
testcase_06 AC 80 ms
76,488 KB
testcase_07 AC 81 ms
76,548 KB
testcase_08 AC 70 ms
71,572 KB
testcase_09 AC 77 ms
76,016 KB
testcase_10 AC 91 ms
76,912 KB
testcase_11 AC 91 ms
77,024 KB
testcase_12 AC 123 ms
77,252 KB
testcase_13 AC 82 ms
76,504 KB
testcase_14 AC 89 ms
76,108 KB
testcase_15 AC 91 ms
76,492 KB
testcase_16 AC 97 ms
76,588 KB
testcase_17 AC 106 ms
77,104 KB
testcase_18 AC 123 ms
77,328 KB
testcase_19 AC 121 ms
77,388 KB
testcase_20 AC 83 ms
76,652 KB
testcase_21 AC 86 ms
76,456 KB
testcase_22 AC 72 ms
71,484 KB
testcase_23 AC 76 ms
76,124 KB
testcase_24 AC 78 ms
76,008 KB
testcase_25 AC 90 ms
77,116 KB
testcase_26 AC 87 ms
76,660 KB
testcase_27 AC 83 ms
76,112 KB
testcase_28 AC 99 ms
76,696 KB
testcase_29 AC 99 ms
76,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353
n, m, tt = map(int, input().split())
g = [[] for _ in range(n)]
for i in range(m):
    s, t = map(int, input().split())
    g[s].append(t)
    g[t].append(s)
d = [0] * n
d[0] = 1
for i in range(tt):
    tmp = [0] * n
    for j in range(n):
        for v in g[j]:
            tmp[j] += d[v]
    for j in range(n):
        tmp[j] %= MOD
    d = tmp[:]
print(d[0])
0