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

简单Dp,主要是要搞清楚时间的转换

Posted by 2008022118 at 2009-12-23 11:19:41 on Problem 2336
Time[i],表示第i辆车过河 并且船回来(注意)的时间;
Trip[i],表示第i辆车过完河 ,船的来回次数;


temp = max(Time[j],T[i]) + 2*t;/*why??*/
if (temp >= Time[i])
{
if(temp == Time[i]) Trip[i]...
else Trip[i]...

Time[i] = temp;
}

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