結果

問題 No.2093 Shio Ramen
ユーザー lllllll88938494
提出日時 2023-03-24 01:59:51
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 238 bytes
コンパイル時間 129 ms
コンパイル使用メモリ 82,728 KB
実行使用メモリ 66,224 KB
最終ジャッジ日時 2024-09-18 15:49:43
合計ジャッジ時間 2,694 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 4 WA * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

n,l=map(int,input().split())

dp = [-1]*(l+1)
dp[0] = 0

for i in range(n):
    s,a=map(int,input().split())
    for j in range(l,0,-1):
        if j - s >= 0 and dp[j-s] != -1:
            dp[j] = dp[j-s] + a
            
print(max(dp))
0