結果

問題 No.1749 ラムドスウイルスの感染拡大
ユーザー kyskys
提出日時 2021-11-19 21:52:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 808 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 87,084 KB
実行使用メモリ 85,136 KB
最終ジャッジ日時 2023-08-30 08:12:19
合計ジャッジ時間 4,944 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,264 KB
testcase_01 AC 70 ms
71,508 KB
testcase_02 AC 70 ms
71,424 KB
testcase_03 AC 71 ms
71,144 KB
testcase_04 AC 107 ms
76,972 KB
testcase_05 AC 69 ms
71,344 KB
testcase_06 AC 80 ms
76,588 KB
testcase_07 AC 80 ms
76,292 KB
testcase_08 AC 74 ms
75,196 KB
testcase_09 AC 74 ms
75,604 KB
testcase_10 AC 88 ms
76,576 KB
testcase_11 AC 85 ms
76,780 KB
testcase_12 AC 129 ms
85,136 KB
testcase_13 AC 80 ms
76,252 KB
testcase_14 AC 85 ms
76,720 KB
testcase_15 AC 88 ms
76,692 KB
testcase_16 AC 90 ms
76,740 KB
testcase_17 AC 110 ms
79,632 KB
testcase_18 AC 132 ms
84,488 KB
testcase_19 AC 127 ms
82,920 KB
testcase_20 AC 84 ms
76,832 KB
testcase_21 AC 83 ms
76,840 KB
testcase_22 AC 72 ms
71,528 KB
testcase_23 AC 78 ms
76,204 KB
testcase_24 AC 77 ms
76,388 KB
testcase_25 AC 89 ms
76,672 KB
testcase_26 AC 87 ms
76,680 KB
testcase_27 AC 85 ms
76,200 KB
testcase_28 AC 104 ms
76,800 KB
testcase_29 AC 101 ms
76,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
def iinput(): return int(input())
def sinput(): return input().rstrip()
def i0input(): return int(input()) - 1
def linput(): return list(input().split())
def liinput(): return list(map(int, input().split()))
def miinput(): return map(int, input().split())
def li0input(): return list(map(lambda x: int(x) - 1, input().split()))
def mi0input(): return map(lambda x: int(x) - 1, input().split())
INF = 10**20
MOD = 998244353

N, M, T = liinput()
g = [[] for _ in range(N)]

for _ in [0] * M:
    s, t = liinput()
    g[s].append(t)
    g[t].append(s)

ans = [[0 for _ in range(N)] for _ in range(T + 1)]
ans[0][0] = 1

for i in range(T):
    for j in range(N):
        for k in g[j]:
            ans[i + 1][j] += ans[i][k]
            ans[i + 1][j] %= MOD
print(ans[T][0])
0