結果

問題 No.2317 Expression Menu
ユーザー KudeKude
提出日時 2023-05-26 21:31:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 529 ms / 2,000 ms
コード長 328 bytes
コンパイル時間 321 ms
コンパイル使用メモリ 87,012 KB
実行使用メモリ 78,088 KB
最終ジャッジ日時 2023-08-26 10:27:20
合計ジャッジ時間 12,858 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,120 KB
testcase_01 AC 71 ms
71,292 KB
testcase_02 AC 89 ms
76,224 KB
testcase_03 AC 204 ms
76,892 KB
testcase_04 AC 203 ms
76,852 KB
testcase_05 AC 205 ms
76,956 KB
testcase_06 AC 204 ms
76,740 KB
testcase_07 AC 172 ms
77,080 KB
testcase_08 AC 208 ms
77,088 KB
testcase_09 AC 181 ms
76,920 KB
testcase_10 AC 217 ms
76,784 KB
testcase_11 AC 220 ms
77,204 KB
testcase_12 AC 185 ms
78,088 KB
testcase_13 AC 202 ms
76,900 KB
testcase_14 AC 223 ms
77,164 KB
testcase_15 AC 178 ms
76,868 KB
testcase_16 AC 205 ms
76,660 KB
testcase_17 AC 206 ms
76,724 KB
testcase_18 AC 242 ms
76,896 KB
testcase_19 AC 218 ms
76,648 KB
testcase_20 AC 222 ms
76,920 KB
testcase_21 AC 202 ms
76,728 KB
testcase_22 AC 174 ms
77,080 KB
testcase_23 AC 527 ms
77,084 KB
testcase_24 AC 522 ms
76,792 KB
testcase_25 AC 529 ms
77,388 KB
testcase_26 AC 519 ms
77,080 KB
testcase_27 AC 523 ms
76,728 KB
testcase_28 AC 528 ms
76,724 KB
testcase_29 AC 516 ms
76,788 KB
testcase_30 AC 519 ms
76,756 KB
testcase_31 AC 517 ms
76,884 KB
testcase_32 AC 516 ms
76,936 KB
testcase_33 AC 72 ms
70,972 KB
testcase_34 AC 72 ms
71,192 KB
testcase_35 AC 71 ms
70,968 KB
testcase_36 AC 71 ms
71,280 KB
testcase_37 AC 71 ms
71,216 KB
testcase_38 AC 499 ms
76,892 KB
testcase_39 AC 451 ms
76,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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