結果

問題 No.1749 ラムドスウイルスの感染拡大
ユーザー 👑 KazunKazun
提出日時 2021-11-19 21:39:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 91 ms / 2,000 ms
コード長 346 bytes
コンパイル時間 359 ms
コンパイル使用メモリ 86,868 KB
実行使用メモリ 76,564 KB
最終ジャッジ日時 2023-08-30 07:44:35
合計ジャッジ時間 4,086 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,244 KB
testcase_01 AC 71 ms
71,224 KB
testcase_02 AC 70 ms
71,360 KB
testcase_03 AC 76 ms
71,452 KB
testcase_04 AC 87 ms
76,376 KB
testcase_05 AC 73 ms
71,460 KB
testcase_06 AC 77 ms
76,392 KB
testcase_07 AC 78 ms
76,188 KB
testcase_08 AC 72 ms
71,368 KB
testcase_09 AC 75 ms
75,576 KB
testcase_10 AC 81 ms
76,236 KB
testcase_11 AC 82 ms
76,404 KB
testcase_12 AC 91 ms
76,292 KB
testcase_13 AC 82 ms
76,292 KB
testcase_14 AC 82 ms
75,864 KB
testcase_15 AC 83 ms
76,064 KB
testcase_16 AC 83 ms
76,400 KB
testcase_17 AC 89 ms
76,220 KB
testcase_18 AC 91 ms
76,376 KB
testcase_19 AC 91 ms
76,276 KB
testcase_20 AC 79 ms
76,356 KB
testcase_21 AC 81 ms
76,564 KB
testcase_22 AC 74 ms
71,020 KB
testcase_23 AC 77 ms
75,932 KB
testcase_24 AC 80 ms
75,712 KB
testcase_25 AC 84 ms
76,216 KB
testcase_26 AC 81 ms
76,344 KB
testcase_27 AC 79 ms
75,892 KB
testcase_28 AC 88 ms
76,256 KB
testcase_29 AC 87 ms
76,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=sys.stdin.readline

N,M,T=map(int,input().split())
Mod=998244353

E=[]
for _ in range(M):
    s,t=map(int,input().split())
    E.append((s,t))

DP=[0]*N; DP[0]=1
D=[0]*N

for _ in range(T):
    for k in range(N):
        D[k]=DP[k]%Mod
        DP[k]=0

    for s,t in E:
        DP[s]+=D[t]
        DP[t]+=D[s]

print(DP[0]%Mod)
0