結果
| 問題 |
No.1749 ラムドスウイルスの感染拡大
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-11-19 22:41:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 67 ms / 2,000 ms |
| コード長 | 305 bytes |
| コンパイル時間 | 296 ms |
| コンパイル使用メモリ | 82,652 KB |
| 実行使用メモリ | 73,340 KB |
| 最終ジャッジ日時 | 2025-01-01 20:26:30 |
| 合計ジャッジ時間 | 2,636 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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])