Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

对不起,我可能没理解你的意思,请看里面这个例子[见内]

Posted by queyue2004 at 2005-08-08 22:02:57
In Reply To:如果加上附加条件,只需让钢材尽可能多的正好分割(没有废料)。可能必须得搜。 Posted by:tengshengbo at 2005-08-08 21:45:17
如果数据是 
4
1400 2
1300 1
800 2
300 1

那么如果排序后遍历应该是,使用3个: 
3000 2800
3000 1300 + 800 * 2
3000 300

实际上最佳方案应该是 2个:
3000 1400 + 1300 + 300
3000 1400 + 800 * 2

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator