結果
| 問題 |
No.2317 Expression Menu
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-05-14 11:50:23 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 385 bytes |
| コンパイル時間 | 484 ms |
| コンパイル使用メモリ | 12,032 KB |
| 実行使用メモリ | 23,716 KB |
| 最終ジャッジ日時 | 2025-05-14 11:50:28 |
| 合計ジャッジ時間 | 5,192 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | TLE * 1 -- * 36 |
ソースコード
n, x, y = map(int, input().split())
dp = [[-1] * (y + 1) for _ in range(x + 1)]
dp[0][0] = 0
for i in range(n):
a, b, c = map(int, input().split())
for j in range(x, -1, -1):
for k in range(y, -1, -1):
if j + a <= x and b + k <= y:
dp[j+a][k+b] = max(dp[j+a][k+b], dp[j][k] + c)
ans = 0
for d in dp:
ans = max(ans, max(d))
print(ans)