結果
| 問題 | No.1749 ラムドスウイルスの感染拡大 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-11-19 22:41:53 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 54 ms / 2,000 ms |
| コード長 | 305 bytes |
| 記録 | |
| コンパイル時間 | 190 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 72,704 KB |
| 最終ジャッジ日時 | 2026-06-05 15:36:04 |
| 合計ジャッジ時間 | 2,363 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 26 |
ソースコード
n,m,t = map(int,input().split())
mod = 998244353
edge = [[int(x) for x in input().split()] for i in range(m)]
dp = [0]*n
dp[0] = 1
for i in range(t):
ndp = [0]*n
for u,v in edge:
ndp[u] += dp[v]
ndp[u] %= mod
ndp[v] += dp[u]
ndp[v] %= mod
dp = ndp
print(dp[0])