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 faen at 2007-01-29 11:12:29
一套钱币的硬币种类有四种,价值分别是:1 5 10 25,  要找出零钱价值为n, 问最少需要多少个硬币。  
我知道这个可以贪心求解。
但是对于另一套硬币种类,假设有三种:1,10,25 ,那么如果要找出零钱30,则用贪心不能够求出最优解,这个时候应该用动态规划。
我想问的是,如果判断一套硬币系统,可以用贪心来求解

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