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 lst at 2009-10-14 19:37:20 on Problem 1651
谁能给出一组数据
我的贪心算法:
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:
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