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

此题出现WA的可测试下这组数据试试!

Posted by piao_ke at 2010-12-06 21:37:01 on Problem 1011
27
15 3 2 4 11 1 8 8 8 15 3 2 4 11 1 8 8 8 15 3 2 4 11 1 8 8 8

答案为20
主要是测试采用贪心算法排序的话会出现的错误
正确组合为(15 3 2)(8 8 4)(11 8 1)
但采用贪心排序的话会先选取(11 3 3 3)这样的话认为20过不了。
我是错在这里,呵呵。

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