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 __stdcall at 2017-02-24 15:31:16 on Problem 3392
如题,网上的做法都是贪心选择前五个
但是有一组数据能很容易的叉掉这个做法?
1
6 6 6
90 0 0 0 0 0
0 90 0 0 0 0
0 0 90 0 0 0
0 0 0 90 0 0
89 89 89 89 90 88
0 0 0 0 100 0
1
2
3
4
5
6
0
0
0
0
0
0
0
0
0
0
正确答案应该是90+90+90+90+88+100
但是如果每次只是贪心选择前五,就变成了90+90+90+0+89+100
网上的题解跑的答案都是4.59,udebug上的标程跑的也是4.59,so?

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