結果

問題 No.2317 Expression Menu
ユーザー nikoro256nikoro256
提出日時 2023-05-26 21:48:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,372 ms / 2,000 ms
コード長 440 bytes
コンパイル時間 399 ms
コンパイル使用メモリ 87,252 KB
実行使用メモリ 299,624 KB
最終ジャッジ日時 2023-08-26 11:11:27
合計ジャッジ時間 43,277 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,320 KB
testcase_01 AC 65 ms
71,012 KB
testcase_02 AC 166 ms
88,016 KB
testcase_03 AC 1,332 ms
298,976 KB
testcase_04 AC 1,351 ms
299,336 KB
testcase_05 AC 1,269 ms
299,188 KB
testcase_06 AC 1,221 ms
299,260 KB
testcase_07 AC 1,212 ms
299,412 KB
testcase_08 AC 1,241 ms
299,512 KB
testcase_09 AC 1,216 ms
299,340 KB
testcase_10 AC 1,222 ms
299,192 KB
testcase_11 AC 1,297 ms
299,404 KB
testcase_12 AC 1,232 ms
299,624 KB
testcase_13 AC 1,203 ms
299,352 KB
testcase_14 AC 1,224 ms
299,136 KB
testcase_15 AC 1,201 ms
299,344 KB
testcase_16 AC 1,243 ms
299,188 KB
testcase_17 AC 1,006 ms
299,332 KB
testcase_18 AC 1,234 ms
299,576 KB
testcase_19 AC 1,223 ms
299,136 KB
testcase_20 AC 1,254 ms
299,352 KB
testcase_21 AC 1,241 ms
299,176 KB
testcase_22 AC 1,266 ms
299,068 KB
testcase_23 AC 1,364 ms
299,240 KB
testcase_24 AC 1,354 ms
299,352 KB
testcase_25 AC 1,370 ms
299,184 KB
testcase_26 AC 1,372 ms
299,428 KB
testcase_27 AC 1,371 ms
299,344 KB
testcase_28 AC 1,369 ms
299,296 KB
testcase_29 AC 1,368 ms
299,448 KB
testcase_30 AC 1,372 ms
299,264 KB
testcase_31 AC 1,361 ms
299,344 KB
testcase_32 AC 1,365 ms
299,260 KB
testcase_33 AC 63 ms
71,324 KB
testcase_34 AC 62 ms
71,340 KB
testcase_35 AC 74 ms
76,176 KB
testcase_36 AC 66 ms
74,976 KB
testcase_37 AC 67 ms
74,848 KB
testcase_38 AC 1,087 ms
299,220 KB
testcase_39 AC 1,112 ms
299,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,X,Y=map(int,input().split())
dp=[[[-10**10 for _ in range(Y+1)] for _ in range(X+1)] for _ in range(N+1)]
dp[0][0][0]=0
for i in range(N):
    A,B,C=map(int,input().split())
    for j in range(X+1):
        for k in range(Y+1):
            dp[i+1][j][k]=max(dp[i+1][j][k],dp[i][j][k])
            if j+A<=X and k+B<=Y:
                dp[i+1][j+A][k+B]=max(dp[i+1][j+A][k+B],dp[i][j][k]+C)
print(max([max(dp[-1][j]) for j in range(X+1)]))
0