登录
首页 » 算法 » 找钱张数最少

找钱张数最少

于 2022-03-06 发布 文件大小:1.92 kB
0 143
下载积分: 2 下载次数: 1

代码说明:

二、问题       现只有面额为 11元、5元、1元的三种人民币。       给定一个 数目为 money 的人民币,如何用这三种面额的人民币 找开它,且用的人民币张数最少       如:给定 10元,我们可以有以下找法:             2张  5元面额             1张  5元面额  + 5 张  1元面额             10张 1元面额       我们 选择第一种找法。只用两张人民币。 三、分析  利用动态规划法可以找到最优解。         利用贪心算法可以找到最优解(问题满足贪心选择性质时。该找钱问题在 11、5、1三种面额的情况下不满足该性质)               或者找到近似 最优解(在本题设定的三种面额的情况下 便是如此)         如果现在要找开 15元钱,则      

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • % [nearest_neighbours] = find_nearest_neighbours( database, desc, max_dist ) %...
    % [nearest_neighbours] = find_nearest_neighbours( database, desc, max_dist ) % Find the indices of the nearest neighbours of the given desriptors in the近邻点寻找算法,在非线性时间序列中很有用,是常用的算法- [Nearest_neighbours] = find_nearest_neighbours (database, desc, max_dist) Find the indices of the nearest neighbours of the given desriptors in the neighbor-point search algorithm, the nonlinear time series of very useful, is a commonly used algorithm
    2022-05-24 09:30:26下载
    积分:1
  • petriNet model
    petriNet model
    2022-02-13 21:02:05下载
    积分:1
  • 简单二叉树的连表
    简单二叉树的连表算法-even simple binary tree algorithm Table
    2022-01-24 13:44:58下载
    积分:1
  • 高斯赛德尔逆矩阵
    高斯赛德尔逆矩阵算法类-high Shisaideer inverse matrix algorithm category
    2022-03-02 18:55:12下载
    积分:1
  • 机器人避障
    简单的机器人避障算法,使用的是虚拟力场的方法。附有效果截图。对于机器人路径规划的初学者会有帮助。代码简单易懂,可以自己设定障碍物的位置。
    2022-08-23 07:06:07下载
    积分:1
  • 竞争性市场均衡
    Competitive Market Equilibrium for Overlay Cognitive Radio
    2022-04-10 20:44:46下载
    积分:1
  • 在去噪的旅行商问题的大文章
    Great articles on noising method algorithm for travelling salesman problem-Great articles on noising method algorithm for travelling salesman problem
    2023-05-10 03:45:03下载
    积分:1
  • 机械设计优化的鲍威尔无约束优化方
    机械优化设计,鲍威尔法无约束优化程序,程序可以在vc6.00++环境运行-Optimization of Mechanical Design, Powell method for unconstrained optimization procedure, the procedure can vc6.00++ Environment running
    2022-08-16 00:47:09下载
    积分:1
  • Simpleson函数,利用子函数设计实现,子函数非常简单,可供参考使用...
    Simpleson算法函数,利用子函数设计实现,子函数非常简单,可供参考使用-Simpleson algorithm functions, the use of subroutine design implementation, subroutine is very simple, available for reference use
    2023-03-31 08:30:04下载
    积分:1
  • 基于MATLAB的语音识别系统程序
    基于MATLAB的语音识别系统程序,包括HMM,DTW,Record三个matlab的M文件。这个工具包主要计算音乐拍子,里面还有计算音乐信号能量,基音频率等功能。
    2023-02-06 14:00:04下载
    积分:1
  • 696516资源总数
  • 106562会员总数
  • 4今日下载