結果

問題 No.1749 ラムドスウイルスの感染拡大
ユーザー ramdosramdos
提出日時 2021-10-14 10:46:47
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 392 bytes
コンパイル時間 269 ms
コンパイル使用メモリ 86,884 KB
実行使用メモリ 97,044 KB
最終ジャッジ日時 2023-08-30 06:24:29
合計ジャッジ時間 4,922 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,484 KB
testcase_01 AC 69 ms
71,452 KB
testcase_02 AC 69 ms
71,448 KB
testcase_03 AC 72 ms
71,260 KB
testcase_04 AC 120 ms
76,988 KB
testcase_05 AC 70 ms
71,392 KB
testcase_06 AC 78 ms
76,728 KB
testcase_07 AC 75 ms
76,664 KB
testcase_08 AC 83 ms
76,296 KB
testcase_09 AC 91 ms
76,440 KB
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M,T=map(int, input().split())
vec=[[0 for i in range(N)] for j in range(N)]
for i in range(M):
  vs,vt=map(int, input().split())
  vec[vs][vt]=1
  vec[vt][vs]=1
dp=[[0 for i in range(N)] for j in range(T+1)]
dp[0][0]=1
for i in range(T):
  for j in range(N):
    for k in range(N):
      if(vec[j][k]==1):
        dp[i+1][j]+=dp[i][k]
        dp[i+1][j]%=998244353
print(dp[T][0]%998244353)
0