登录
首页 » Visual C++ » 0

0

于 2009-07-01 发布 文件大小:1KB
0 277
下载积分: 1 下载次数: 0

代码说明:

说明:  给定n种物品和一个背包,物品i的重量是Wi,价值是vi,被包容量是C,应该如何选择装入被包的物品,使得装入背包中物品的总价值最大?对于每种物品i,只有两种选择,装入或者不装入. 输入:第一行两个正整数n(物品数)和C(容量) 第二行n个正整数n,表示物品价值 第三行n个正整数n,表示物品重量 输出:第一行表示总价值 第二行n个数(0/1),0表示物品不装入,1表示装入 例如, 输入: 5 10 6 3 5 4 6 2 2 6 5 4 输出 15 1 1 0 0 1 (Species of a given n items and a backpack, the weight of item i is Wi, the value of vi, was packet capacity is C, should be how to choose a package of items to be loaded, the backpack load in the largest total value of goods? For each item i, there are only two options, loaded or not loaded. Input: the first line of the two positive integer n (the number of items) and C (capacity) of the second line of n positive integer n, that the value of the third line of n positive integer n, that the weight of output: the total value of the first line of the second line, said n number of (0/1), 0 that the items do not load, that load 1 for example, enter: 5,106,354,622 6 5 4 output 15 1 1 0 0 1)

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

发表评论

0 个回复

  • 1
    说明:  倒立摆数学模型及分析及建模叙述,主要是过程(Pendulum mathematical model and analysis)
    2014-11-26 22:29:14下载
    积分:1
  • Wheel-And-Axle
    基于matlab建立的关于汽车轴的控制模型,包括轴的运动方程和模型的建立。其实在ADVISOR中可以找到,不过,用matlab2012版重新建立了。(Established based on matlab axis control on the car model, including axis motion equations and model. ADVISOR can be found in the fact, however, re-established with matlab2012 version.)
    2013-11-22 17:02:17下载
    积分:1
  • smartfox
    说明:  一个Foxmail的辅助工具 SmartFox ,实现闪存“随身邮”功能,用来解决使用闪存时foxmail不提示已使用帐号的问题。(an auxiliary tool SmartFox achieve flash "Walkman Post" feature, intended to address the use of flash when I have not suggested the use of the account.)
    2005-10-27 15:09:54下载
    积分:1
  • -Power-System-Load-Forecasting-
    说明:  电力系统负荷预测研究综述与发展方向的探讨(Review of Power System Load Forecasting and the development of)
    2011-04-06 13:39:18下载
    积分:1
  • ewwqm
    用matlab画了一个小动物,利用了plot,sina,cos等 函数(use Matlab drew a small animal )
    2013-05-09 15:13:08下载
    积分:1
  • matlab
    这是自己编写的关于OMP的matlab程序,欢迎借鉴,谢谢(This is a matlab program, I have written about the OMP welcome to learn from, thank you)
    2012-06-13 12:22:03下载
    积分:1
  • DEA的Matlab
    DEA的CCR模型程序及其对偶模型(包括松弛变量)的程序计算(CCR model program and its dual DEA model (including relaxation variables) program calculation)
    2021-02-08 13:49:54下载
    积分:1
  • sistsp
    遗传算法在优化路径中的应用研究,这是MATLAB仿真的源程序。(The genetic algorithm optimization applied research in the path, which is the source of the MATLAB simulation.)
    2012-04-21 19:54:24下载
    积分:1
  • PPPUMA560U
    PUMA560仿真系统,基于MATLAB的robottics toolbox工具箱. (PUMA560 simulation system based on MATLAB robottics toolbox, toolbox.)
    2012-08-18 06:08:46下载
    积分:1
  • Sidelobe-Canceller--MSE-
    阵列信号处理中自适应波束优化准则之一ASC旁瓣相消 MSE准则(Array Signal Processing ASC adaptive beam sidelobe canceller MSE criterion of optimization criteria)
    2015-04-17 15:32:23下载
    积分:1
  • 696516资源总数
  • 106627会员总数
  • 16今日下载