結果

問題 No.2093 Shio Ramen
ユーザー 👑 rin204rin204
提出日時 2022-10-07 21:23:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 197 bytes
コンパイル時間 1,563 ms
コンパイル使用メモリ 87,028 KB
実行使用メモリ 77,104 KB
最終ジャッジ日時 2023-09-02 23:41:54
合計ジャッジ時間 4,894 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,296 KB
testcase_01 AC 72 ms
70,936 KB
testcase_02 AC 72 ms
71,256 KB
testcase_03 AC 71 ms
71,448 KB
testcase_04 AC 70 ms
71,504 KB
testcase_05 AC 70 ms
70,944 KB
testcase_06 AC 72 ms
71,304 KB
testcase_07 AC 71 ms
71,408 KB
testcase_08 AC 70 ms
71,096 KB
testcase_09 AC 88 ms
77,020 KB
testcase_10 AC 89 ms
76,884 KB
testcase_11 AC 76 ms
76,076 KB
testcase_12 AC 86 ms
76,752 KB
testcase_13 AC 86 ms
77,000 KB
testcase_14 AC 85 ms
76,820 KB
testcase_15 AC 87 ms
77,044 KB
testcase_16 AC 87 ms
77,104 KB
testcase_17 AC 87 ms
76,996 KB
testcase_18 AC 90 ms
76,964 KB
testcase_19 AC 86 ms
77,076 KB
testcase_20 AC 88 ms
76,816 KB
testcase_21 AC 88 ms
76,916 KB
testcase_22 AC 89 ms
76,856 KB
testcase_23 AC 88 ms
77,036 KB
testcase_24 AC 90 ms
76,868 KB
testcase_25 AC 89 ms
76,816 KB
testcase_26 AC 91 ms
77,020 KB
testcase_27 AC 92 ms
76,820 KB
testcase_28 AC 91 ms
76,980 KB
testcase_29 AC 90 ms
76,916 KB
testcase_30 AC 90 ms
76,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, I = map(int, input().split())
dp = [0] * (I + 1)
for _ in range(n):
    s, a = map(int, input().split())
    for i in range(I, s - 1, -1):
        dp[i] = max(dp[i], dp[i - s] + a)
print(dp[-1])
0