結果
問題 | No.1749 ラムドスウイルスの感染拡大 |
ユーザー | yassu0320 |
提出日時 | 2021-11-23 13:37:10 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 218 ms / 2,000 ms |
コード長 | 1,200 bytes |
コンパイル時間 | 446 ms |
コンパイル使用メモリ | 87,316 KB |
実行使用メモリ | 81,184 KB |
最終ジャッジ日時 | 2023-09-07 16:12:58 |
合計ジャッジ時間 | 7,797 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 168 ms
79,196 KB |
testcase_01 | AC | 173 ms
79,236 KB |
testcase_02 | AC | 167 ms
79,232 KB |
testcase_03 | AC | 165 ms
79,084 KB |
testcase_04 | AC | 190 ms
80,684 KB |
testcase_05 | AC | 167 ms
79,296 KB |
testcase_06 | AC | 169 ms
80,340 KB |
testcase_07 | AC | 173 ms
80,252 KB |
testcase_08 | AC | 167 ms
79,172 KB |
testcase_09 | AC | 167 ms
79,748 KB |
testcase_10 | AC | 176 ms
80,316 KB |
testcase_11 | AC | 177 ms
80,080 KB |
testcase_12 | AC | 214 ms
80,760 KB |
testcase_13 | AC | 168 ms
80,184 KB |
testcase_14 | AC | 178 ms
80,380 KB |
testcase_15 | AC | 183 ms
80,304 KB |
testcase_16 | AC | 186 ms
80,616 KB |
testcase_17 | AC | 203 ms
80,832 KB |
testcase_18 | AC | 218 ms
80,884 KB |
testcase_19 | AC | 215 ms
81,184 KB |
testcase_20 | AC | 180 ms
80,676 KB |
testcase_21 | AC | 180 ms
80,292 KB |
testcase_22 | AC | 170 ms
79,104 KB |
testcase_23 | AC | 171 ms
80,068 KB |
testcase_24 | AC | 173 ms
80,000 KB |
testcase_25 | AC | 184 ms
80,612 KB |
testcase_26 | AC | 183 ms
80,756 KB |
testcase_27 | AC | 176 ms
80,220 KB |
testcase_28 | AC | 193 ms
80,712 KB |
testcase_29 | AC | 188 ms
80,572 KB |
ソースコード
#!/usr/bin/env python3 from pprint import pprint from sys import setrecursionlimit, stdin from typing import Dict, Iterable, Set INF: int = 1 << 62 MOD1000000007 = 10**9 + 7 MOD998244353 = 998244353 setrecursionlimit(1_000_000) def inputs(type_=int): ins = input().split() if isinstance(type_, Iterable): return [t(x) for t, x in zip(type_, ins)] else: return list(map(type_, ins)) def input_(type_=int): a, = inputs(type_) return a def input1() -> int: return int(input()) inputi = input1 def input2(): a, b = input().split() return int(a), int(b) def input3(): a, b, c = input().split() return int(a), int(b), int(c) def input4(): a, b, c, d = input().split() return int(a), int(b), int(c), int(d) def answer(res) -> None: print(res) exit() # start coding n, m, t = input3() mod = MOD998244353 g = [[] for _ in range(n)] for _ in range(m): p, q = input2() g[p].append(q) g[q].append(p) cnts = [0] * n cnts[0] = 1 for _ in range(t): ncnts = [0] * n for u in range(n): for v in g[u]: ncnts[v] += cnts[u] ncnts[v] %= mod cnts = ncnts print(cnts[0])