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

Re:题意和贪心思路

Posted by ct314171238 at 2008-06-05 20:22:19 on Problem 1018 and last updated at 2008-06-05 20:28:55
In Reply To:题意和贪心思路 Posted by:yuanyirui at 2007-02-04 16:00:14
这个题这样解释其实是错的,如果是按照最小值里的最大值循环到最大值里的最小值的话,可能会出现不能选出正确答案,
比如:
1 3
2 1 1 2 2
2 2 1 2 2
1 1 1
如果按照这位大牛的做法的话,结果只能是0.000,而正确答案应该是0.333,其实不因该是从这样的最小
值,而应该是从总的b中选取最小值。不过oj上的两种代码都过了,只是用大牛的这个想法钻了个漏洞,时间
相差16MS,不过仍然要谢谢这位大牛提供的思路,之前这个题一直不敢下手。

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