結果
問題 | No.1749 ラムドスウイルスの感染拡大 |
ユーザー |
![]() |
提出日時 | 2021-11-22 00:42:45 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 100 ms / 2,000 ms |
コード長 | 455 bytes |
コンパイル時間 | 169 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 76,160 KB |
最終ジャッジ日時 | 2024-06-23 07:32:19 |
合計ジャッジ時間 | 3,173 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 26 |
ソースコード
import sys import io, os input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline n, m, t = map(int, input().split()) edge = [[] for i in range(n)] for i in range(m): u, v = map(int, input().split()) edge[u].append(v) edge[v].append(u) mod = 998244353 dp = [0]*n dp[0] = 1 for i in range(t): nx = [0]*n for v in range(n): for u in edge[v]: nx[v] += dp[u] nx[v] %= mod dp = nx print(dp[0]%mod)