結果
問題 |
No.2093 Shio Ramen
|
ユーザー |
|
提出日時 | 2022-10-12 08:55:20 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 312 bytes |
コンパイル時間 | 93 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 19,840 KB |
最終ジャッジ日時 | 2024-06-26 02:32:17 |
合計ジャッジ時間 | 8,447 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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])