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 alpc02 at 2007-01-29 13:50:05
In Reply To:Re:请教一个问题:找零钱问题 贪心?动态规划? Posted by:faen at 2007-01-29 12:13:32
> 第二种怎么用贪心解决? 另外,如何判断何时可以用贪心?
我觉得应该是倍数关系时可以贪心
比如1,2,5,10
10是1、2、5的倍数,所以可以贪心

至于10,25
拿2个25就是50,是10的倍数,所以可以2个2个地去贪心

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