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 |
Re:题意和贪心思路In Reply To:题意和贪心思路 Posted by:yuanyirui at 2007-02-04 16:00:14 > 题目讲在不同设备中个取出一种设备,使得这些设备带宽的最小值和它们价值的总和的比最大. > 贪心思路: > 1,获得一个最小和最大带宽:最小带宽是各个设备最小带宽的最大值,最大带宽是各个设备最大带宽的最小值. > 2,从最小值递增到最大值进行寻找,计算各种设备价钱的最小值的和,然后计算出一个比值,如果比值比当前比值大,更换当前比值; > 3,重复2直到结束. 这是贪心吗?怎么感觉像暴力枚举 ... Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator