結果

問題 No.1111 コード進行
ユーザー marroncastlemarroncastle
提出日時 2020-07-10 22:09:04
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 469 bytes
コンパイル時間 405 ms
コンパイル使用メモリ 82,356 KB
実行使用メモリ 515,356 KB
最終ジャッジ日時 2024-04-19 17:21:12
合計ジャッジ時間 12,131 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
61,824 KB
testcase_01 AC 41 ms
61,056 KB
testcase_02 AC 37 ms
53,504 KB
testcase_03 AC 37 ms
53,504 KB
testcase_04 AC 37 ms
53,376 KB
testcase_05 RE -
testcase_06 AC 80 ms
86,272 KB
testcase_07 RE -
testcase_08 AC 61 ms
74,624 KB
testcase_09 AC 64 ms
70,400 KB
testcase_10 AC 86 ms
91,604 KB
testcase_11 AC 59 ms
72,576 KB
testcase_12 AC 85 ms
86,220 KB
testcase_13 AC 59 ms
72,064 KB
testcase_14 AC 99 ms
90,772 KB
testcase_15 AC 69 ms
88,448 KB
testcase_16 AC 90 ms
87,700 KB
testcase_17 AC 81 ms
91,904 KB
testcase_18 AC 51 ms
72,192 KB
testcase_19 AC 44 ms
62,208 KB
testcase_20 RE -
testcase_21 AC 47 ms
70,784 KB
testcase_22 RE -
testcase_23 RE -
testcase_24 AC 60 ms
74,240 KB
testcase_25 AC 111 ms
90,624 KB
testcase_26 AC 83 ms
91,132 KB
testcase_27 AC 52 ms
66,176 KB
testcase_28 AC 438 ms
316,372 KB
testcase_29 AC 277 ms
245,120 KB
testcase_30 AC 345 ms
228,348 KB
testcase_31 AC 88 ms
91,904 KB
testcase_32 AC 455 ms
304,988 KB
testcase_33 AC 285 ms
159,392 KB
testcase_34 AC 311 ms
251,392 KB
testcase_35 AC 484 ms
369,232 KB
testcase_36 AC 597 ms
316,544 KB
testcase_37 AC 271 ms
223,464 KB
testcase_38 AC 218 ms
181,608 KB
testcase_39 AC 445 ms
227,568 KB
testcase_40 AC 553 ms
314,624 KB
testcase_41 AC 519 ms
351,712 KB
testcase_42 AC 354 ms
250,368 KB
testcase_43 AC 305 ms
201,600 KB
testcase_44 AC 178 ms
160,000 KB
testcase_45 AC 396 ms
278,004 KB
testcase_46 AC 280 ms
295,788 KB
testcase_47 MLE -
testcase_48 AC 298 ms
295,880 KB
testcase_49 AC 289 ms
295,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M, K = map(int, input().split())
P = [0]*M
Q = [0]*M
C = [0]*M
for i in range(M):
    P[i],Q[i],C[i] = map(int, input().split())
dp = [[[0]*300 for _ in range(K+300)] for _ in range(N)]
mod = 10**9+7
for i in range(300):
    dp[0][0][i] = 1
for n in range(N-1):
    for k in range(K+1):
        for i in range(300):
            dp[n][k][i] %= mod
        for i in range(M):
            dp[n+1][k+C[i]][Q[i]-1] += dp[n][k][P[i]-1]
ans = sum(dp[-1][K])%mod
print(ans)
0