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 DHLX at 2010-07-21 23:25:05 on Problem 1700
当N>4时,则有两种乘法:举例子
例子:
4
1 7 8 20
答案:37 

顺序是:1、20去,1回;1、8去,1回;1、7去。 

例子:
4
1 2 5 10
答案:17 

顺序是:1、2去,1回;5、10去;2回;1、2去。
N=3时,就用用最小的一个将剩下的两个送过岸
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