結果
問題 | No.1749 ラムドスウイルスの感染拡大 |
ユーザー |
|
提出日時 | 2021-11-19 23:21:23 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 168 ms / 2,000 ms |
コード長 | 361 bytes |
コンパイル時間 | 354 ms |
コンパイル使用メモリ | 82,588 KB |
実行使用メモリ | 77,388 KB |
最終ジャッジ日時 | 2025-01-01 22:15:13 |
合計ジャッジ時間 | 3,866 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 26 |
ソースコード
n, m, t = map(int, input().split()) G = [[] for i in range(n)] for _ in range(m): a, b = map(int, input().split()) G[a].append(b) G[b].append(a) cnt = [0] * n cnt[0] = 1 mod = 998244353 from copy import deepcopy for _ in range(t): ncnt = [0] * n for i in range(n): for v in G[i]: ncnt[i] += cnt[v] ncnt[i] %= mod cnt = deepcopy(ncnt) print(cnt[0])