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:lst at 2009-10-14 19:37:20 > 谁能给出一组数据 > 我的贪心算法: > 6 > 10 1 50 50 20 5 > 选出最大的数字 > 50 > 如果有多个就计算乘积f(2)=2500<f(3)=50000 > sum+=f(2); > 就这样依次取出:50 50 20 1 > 结束 大傻子 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator