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 laml77 at 2016-03-26 14:18:35 on Problem 1700
题意:也就是一个坐船问题,一共有两个策略
①最快和次快过去,最快回;最慢和次慢过去,次快回,t=s[1]+s[0]+s[n-1]+s[1]。②最快和最慢过去,最快回;最快和次快过去,最快回,t=s[n-1]+s[0]+s[n-2]+s[0]。选择两者中用时较少的一个策略执行。如此便将最慢和次慢送过河,对剩下n-2个人循环处理。注意当n=1、n=2、n=3时直接相加处理即可。

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