結果

問題 No.2093 Shio Ramen
ユーザー ああああ
提出日時 2022-10-12 14:23:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 222 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 86,748 KB
実行使用メモリ 76,984 KB
最終ジャッジ日時 2023-09-08 15:47:01
合計ジャッジ時間 4,885 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
70,904 KB
testcase_01 AC 74 ms
71,072 KB
testcase_02 AC 73 ms
71,048 KB
testcase_03 AC 75 ms
71,272 KB
testcase_04 AC 71 ms
71,164 KB
testcase_05 AC 73 ms
71,212 KB
testcase_06 AC 73 ms
71,188 KB
testcase_07 AC 71 ms
70,868 KB
testcase_08 AC 72 ms
71,060 KB
testcase_09 AC 87 ms
76,984 KB
testcase_10 AC 91 ms
76,444 KB
testcase_11 AC 81 ms
75,740 KB
testcase_12 AC 87 ms
76,696 KB
testcase_13 AC 89 ms
76,580 KB
testcase_14 AC 88 ms
76,696 KB
testcase_15 AC 90 ms
76,716 KB
testcase_16 AC 89 ms
76,572 KB
testcase_17 AC 89 ms
76,544 KB
testcase_18 AC 98 ms
76,612 KB
testcase_19 AC 92 ms
76,408 KB
testcase_20 AC 91 ms
76,652 KB
testcase_21 AC 92 ms
76,616 KB
testcase_22 AC 90 ms
76,808 KB
testcase_23 AC 95 ms
76,800 KB
testcase_24 AC 96 ms
76,956 KB
testcase_25 AC 94 ms
76,544 KB
testcase_26 AC 95 ms
76,616 KB
testcase_27 AC 93 ms
76,700 KB
testcase_28 AC 97 ms
76,580 KB
testcase_29 AC 96 ms
76,616 KB
testcase_30 AC 97 ms
76,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,I=map(int,input().split())
dp=[-10**18]*1002
dp[0]=0
for i in range(N):
    s,a=map(int,input().split())
    for j in range(I+1,-1,-1):
        if j-s>=0:
            dp[j]=max(dp[j],dp[j-s]+a)

print(max(dp[:I+1]))




0