結果

問題 No.2317 Expression Menu
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2023-05-26 22:23:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 587 ms / 2,000 ms
コード長 346 bytes
コンパイル時間 419 ms
コンパイル使用メモリ 87,208 KB
実行使用メモリ 79,240 KB
最終ジャッジ日時 2023-08-26 12:21:08
合計ジャッジ時間 14,931 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
71,244 KB
testcase_01 AC 62 ms
71,308 KB
testcase_02 AC 96 ms
76,788 KB
testcase_03 AC 290 ms
79,208 KB
testcase_04 AC 268 ms
78,344 KB
testcase_05 AC 296 ms
78,936 KB
testcase_06 AC 310 ms
78,784 KB
testcase_07 AC 259 ms
79,048 KB
testcase_08 AC 301 ms
78,924 KB
testcase_09 AC 285 ms
79,096 KB
testcase_10 AC 312 ms
79,000 KB
testcase_11 AC 311 ms
78,964 KB
testcase_12 AC 284 ms
78,312 KB
testcase_13 AC 286 ms
78,284 KB
testcase_14 AC 322 ms
79,056 KB
testcase_15 AC 292 ms
79,076 KB
testcase_16 AC 297 ms
78,056 KB
testcase_17 AC 307 ms
79,240 KB
testcase_18 AC 302 ms
79,160 KB
testcase_19 AC 328 ms
78,776 KB
testcase_20 AC 324 ms
78,952 KB
testcase_21 AC 290 ms
78,804 KB
testcase_22 AC 269 ms
78,956 KB
testcase_23 AC 582 ms
78,960 KB
testcase_24 AC 577 ms
78,976 KB
testcase_25 AC 570 ms
78,992 KB
testcase_26 AC 564 ms
79,040 KB
testcase_27 AC 572 ms
78,776 KB
testcase_28 AC 575 ms
78,680 KB
testcase_29 AC 562 ms
78,992 KB
testcase_30 AC 565 ms
78,988 KB
testcase_31 AC 587 ms
78,680 KB
testcase_32 AC 570 ms
78,680 KB
testcase_33 AC 63 ms
71,280 KB
testcase_34 AC 64 ms
71,512 KB
testcase_35 AC 72 ms
76,512 KB
testcase_36 AC 64 ms
71,320 KB
testcase_37 AC 65 ms
71,504 KB
testcase_38 AC 435 ms
78,476 KB
testcase_39 AC 477 ms
78,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,x,y = map(int,input().split())

dp = [[0]*(y+1) for i in range(x+1)]
for _ in range(n):
    a,b,c = map(int,input().split())

    for j in range(x)[::-1]:
        for k in range(y)[::-1]:
            if j+a <= x and b+k <= y:
                dp[j+a][b+k] = max(dp[j+a][b+k],dp[j][k]+c)

ans = 0
for i in dp:
    ans = max(ans,max(i))
print(ans)
0