算法:装箱问题——bin-packing problem(greedy algorithm)

工厂生产的方形产品装在相同高度的包装中,尺寸为1*1到6*6。产品总是装在与产品高度相同的6*6方形包裹中。为节省成本,需要找到将订单产品运送给客户所需的最少包裹数。这是一个使用贪婪算法解决的问题,能有效节省费用。
摘要由CSDN通过智能技术生成

problem:

Afactory produces products packed in square packets of the same height h and ofthe sizes 1*1, 2*2, 3*3, 4*4, 5*5, 6*6. These products are always delivered tocustomers in the square parcels of the same height h as the products have andof the size 6*6. Because of the expenses it is the interest of the factory aswell as of the customer to minimize the number of parcels necessary to deliverthe ordered products from the factory to the customer. A good program solvingthe problem of finding the minimal number of parcels necessary to deliver thegiven products according to an order would save a lot of money. You are askedto make such a program.

Sample Input

00 4 0 0 1

75 1 0 0 0

00 0 0 0 0

Sample Output

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值