結果

問題 No.1111 コード進行
ユーザー hir355hir355
提出日時 2020-07-10 21:41:24
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 496 bytes
コンパイル時間 153 ms
コンパイル使用メモリ 82,504 KB
実行使用メモリ 322,340 KB
最終ジャッジ日時 2024-04-19 16:25:59
合計ジャッジ時間 11,694 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
57,984 KB
testcase_01 AC 39 ms
57,976 KB
testcase_02 AC 37 ms
52,096 KB
testcase_03 AC 37 ms
52,608 KB
testcase_04 AC 37 ms
52,608 KB
testcase_05 AC 46 ms
62,976 KB
testcase_06 AC 61 ms
68,992 KB
testcase_07 AC 57 ms
67,712 KB
testcase_08 AC 53 ms
64,384 KB
testcase_09 AC 58 ms
65,280 KB
testcase_10 AC 57 ms
69,376 KB
testcase_11 AC 50 ms
63,616 KB
testcase_12 AC 64 ms
69,504 KB
testcase_13 AC 54 ms
66,560 KB
testcase_14 AC 70 ms
71,936 KB
testcase_15 AC 50 ms
63,488 KB
testcase_16 AC 81 ms
80,968 KB
testcase_17 AC 54 ms
69,504 KB
testcase_18 AC 46 ms
62,080 KB
testcase_19 AC 44 ms
60,928 KB
testcase_20 AC 50 ms
64,244 KB
testcase_21 AC 45 ms
60,544 KB
testcase_22 AC 62 ms
72,992 KB
testcase_23 AC 58 ms
69,120 KB
testcase_24 AC 53 ms
67,164 KB
testcase_25 AC 78 ms
74,624 KB
testcase_26 WA -
testcase_27 AC 50 ms
63,488 KB
testcase_28 AC 222 ms
182,960 KB
testcase_29 AC 138 ms
114,304 KB
testcase_30 WA -
testcase_31 AC 75 ms
87,680 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 170 ms
154,240 KB
testcase_35 AC 213 ms
159,832 KB
testcase_36 AC 508 ms
184,192 KB
testcase_37 AC 161 ms
101,760 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 AC 296 ms
197,632 KB
testcase_42 AC 272 ms
124,544 KB
testcase_43 WA -
testcase_44 AC 105 ms
91,236 KB
testcase_45 AC 243 ms
148,768 KB
testcase_46 WA -
testcase_47 AC 1,037 ms
297,984 KB
testcase_48 AC 51 ms
63,872 KB
testcase_49 AC 54 ms
63,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 10 ** 9 + 7
n, m, k = map(int, input().split())
t = [[] for _ in range(300)]
for _ in range(m):
    p, q, c = map(int, input().split())
    t[p - 1].append((q - 1, c))
dp = [[[0] * (300) for _ in range(k + 1)] for _ in range(n)]
for i in range(300):
    dp[0][0][i] = 1
for i in range(n - 1):
    for j in range(k + 1):
        for a in range(300):
            for b, c in t[a]:
                if j + c <= k:
                    dp[i + 1][j + c][b] += dp[i][j][a]
print(sum(dp[n - 1][k]))
0