結果

問題 No.617 Nafmo、買い出しに行く
ユーザー 👑 yumechiyumechi
提出日時 2017-12-23 04:51:23
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 190 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 87,280 KB
実行使用メモリ 138,592 KB
最終ジャッジ日時 2023-08-22 15:31:10
合計ジャッジ時間 3,617 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,300 KB
testcase_01 AC 69 ms
71,356 KB
testcase_02 AC 92 ms
76,448 KB
testcase_03 AC 83 ms
84,232 KB
testcase_04 AC 70 ms
71,120 KB
testcase_05 AC 101 ms
102,168 KB
testcase_06 AC 70 ms
71,360 KB
testcase_07 AC 70 ms
71,276 KB
testcase_08 RE -
testcase_09 AC 69 ms
71,276 KB
testcase_10 AC 139 ms
138,592 KB
testcase_11 AC 131 ms
130,684 KB
testcase_12 AC 124 ms
118,388 KB
testcase_13 AC 132 ms
131,424 KB
testcase_14 AC 136 ms
134,492 KB
testcase_15 RE -
testcase_16 AC 105 ms
103,712 KB
testcase_17 RE -
testcase_18 RE -
testcase_19 AC 69 ms
71,296 KB
testcase_20 AC 70 ms
71,232 KB
testcase_21 AC 70 ms
71,232 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
al = sorted([int(input()) for _ in range(n)])
dp = set()
for a in al:
  for d in set(dp):
    dp.add(a + d)
  dp.add(a)
print(max([a for a in dp if a <= k]))
0