結果

問題 No.1111 コード進行
ユーザー 👑 KazunKazun
提出日時 2020-07-10 22:31:21
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 652 bytes
コンパイル時間 270 ms
コンパイル使用メモリ 82,520 KB
実行使用メモリ 299,884 KB
最終ジャッジ日時 2024-04-19 20:59:39
合計ジャッジ時間 17,293 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
81,792 KB
testcase_01 AC 77 ms
76,672 KB
testcase_02 AC 62 ms
75,648 KB
testcase_03 AC 62 ms
76,160 KB
testcase_04 AC 63 ms
75,904 KB
testcase_05 AC 474 ms
201,728 KB
testcase_06 TLE -
testcase_07 AC 1,887 ms
286,796 KB
testcase_08 AC 642 ms
136,492 KB
testcase_09 AC 1,195 ms
264,832 KB
testcase_10 TLE -
testcase_11 AC 505 ms
141,284 KB
testcase_12 TLE -
testcase_13 AC 1,209 ms
274,944 KB
testcase_14 TLE -
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 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

A=10**9+7
N,M,K=map(int,input().split())
S=300

E=[[] for _ in range(S+1)]
F=[[] for _ in range(S+1)]
for _ in range(M):
    p,q,c=map(int,input().split())
    E[p].append((q,c))
    F[q].append((p,c))

Y=0
for f in range(1,S+1):
    X=[[[0]*(K+1) for _ in range(S+1)] for _ in range(N)]
    #X[n][a][k]...n個目のコードがaで総複雑度がk
    X[0][f][0]=1

    for n in range(1,N):
        for a in range(1,S+1):
            for k in range(K+1):
                for (q,c) in F[a]:
                    if k>=c:
                        X[n][a][k]=(X[n][a][k]+X[n-1][q][k-c])%A

    for a in range(1,S+1):
        Y=(Y+X[-1][a][-1])%A

print(Y)
0