Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
此题出现WA的可测试下这组数据试试!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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator