結果

問題 No.2317 Expression Menu
ユーザー ニックネームニックネーム
提出日時 2023-05-26 21:29:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 490 ms / 2,000 ms
コード長 286 bytes
コンパイル時間 278 ms
コンパイル使用メモリ 87,016 KB
実行使用メモリ 78,420 KB
最終ジャッジ日時 2023-08-26 10:22:18
合計ジャッジ時間 12,505 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
71,492 KB
testcase_01 AC 63 ms
71,060 KB
testcase_02 AC 87 ms
76,476 KB
testcase_03 AC 180 ms
76,968 KB
testcase_04 AC 178 ms
76,864 KB
testcase_05 AC 193 ms
76,888 KB
testcase_06 AC 182 ms
76,892 KB
testcase_07 AC 145 ms
76,960 KB
testcase_08 AC 191 ms
76,608 KB
testcase_09 AC 152 ms
76,932 KB
testcase_10 AC 191 ms
77,128 KB
testcase_11 AC 194 ms
77,084 KB
testcase_12 AC 161 ms
78,100 KB
testcase_13 AC 184 ms
76,932 KB
testcase_14 AC 202 ms
76,884 KB
testcase_15 AC 201 ms
76,688 KB
testcase_16 AC 191 ms
76,920 KB
testcase_17 AC 188 ms
76,704 KB
testcase_18 AC 238 ms
76,972 KB
testcase_19 AC 195 ms
76,956 KB
testcase_20 AC 205 ms
76,876 KB
testcase_21 AC 207 ms
76,980 KB
testcase_22 AC 148 ms
76,988 KB
testcase_23 AC 484 ms
78,420 KB
testcase_24 AC 490 ms
78,064 KB
testcase_25 AC 488 ms
78,116 KB
testcase_26 AC 478 ms
77,956 KB
testcase_27 AC 478 ms
77,884 KB
testcase_28 AC 484 ms
78,140 KB
testcase_29 AC 469 ms
78,152 KB
testcase_30 AC 462 ms
78,268 KB
testcase_31 AC 474 ms
77,868 KB
testcase_32 AC 472 ms
78,184 KB
testcase_33 AC 63 ms
71,116 KB
testcase_34 AC 62 ms
71,544 KB
testcase_35 AC 65 ms
75,172 KB
testcase_36 AC 61 ms
71,216 KB
testcase_37 AC 63 ms
71,496 KB
testcase_38 AC 442 ms
78,160 KB
testcase_39 AC 376 ms
76,692 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):
            dp[i][j] = max(dp[i][j],dp[i-a][j-b]+c)
ans = 0
for s in dp: ans = max(s)
print(ans)
0