装箱问题
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
有一个箱子容量为 (正整数,),同时有 个物品(),每个物品有一个体积(正整数)。
要求从n个物品中任取若干个装入箱内,使箱子的剩余空间为最小。
输入格式
第一行两个整数 和 ,分别表示物品数量和箱子容量
第二行 个整数,第 个数表示第 个物品的体积
输出格式
仅一行一个整数,表示最小的箱子剩余空间。
6 24
8 3 12 7 9 7
0
黑猫白银级公开赛04
- Status
- Done
- Rule
- OI
- Problem
- 4
- Start at
- 2024-2-16 16:00
- End at
- 2024-2-25 0:00
- Duration
- 200 hour(s)
- Host
- Partic.
- 10