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 jinlang5252 at 2006-07-29 10:07:12 on Problem 2336
最少时间关键是 最快把最后一辆车运走.就是使最后一辆车的等待时间为最少(最好为0).然后就是找一个算法使运的次数最少.
具体思路:把所有的车的重量看成一个大的整数N,船的容量为一小整数n 。当N整除n时,船每次装满才走;
当N不整除n时,船第一次把余数运走,后面每次装满才走。这样可以保证在最快的时间里把最后一辆车运走,也可以保证运的次数最少!!!

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