| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
硬币题,DP吧In Reply To:问个题目,帮忙看看。谢谢! [见内] Posted by:queyue2004 at 2005-08-08 20:44:54 > 有一批钢材,长度为3000mm。需要将它们切割成长度不一的零件,问如何切割 > 才能使用料最少。 > 输入 > 第一行表示零件的种类n,之后是n行。 > 每一行包含两个数字 l , m, l表示零件的长度,m表示需要的这种零件的个数 > 其中 m < 100, > > 输出,输出总共需要的钢材的数量 > > sample > > 3 > 1500 3 > 1000 4 > 2000 2 > > 输出 6 > > [另] 如果还需要考虑钢材切割方式最少的方式,那怎么办? > 比如以上的采用的切割方式有 > 1500 * 2 > 2000 + 1000 > 1000 * 3 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator