結果
| 問題 | No.2093 Shio Ramen |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-12 08:55:20 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 312 bytes |
| 記録 | |
| コンパイル時間 | 768 ms |
| コンパイル使用メモリ | 20,568 KB |
| 実行使用メモリ | 21,084 KB |
| 最終ジャッジ日時 | 2026-03-12 15:53:56 |
| 合計ジャッジ時間 | 8,169 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 30 |
ソースコード
n,l=list(map(int,input().split()))
sa=[list(map(int,input().split())) for _ in range (n)]
dp=[[0]*(l+1) for _ in range(n+1)]
for i,(s,a) in enumerate(sa):
for j in range(l+1):
if j>=s:
dp[i+1][j]=max(dp[i][j],dp[i][j-s]+s+a)
else:
dp[i+1][j]=dp[i][j]
print(dp[-1][-1])