登录
首页 » Visual C++ » 0

0

于 2009-07-01 发布 文件大小:1KB
0 267
下载积分: 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 个回复

  • iHMM
    infinite HMM Refer to Beal s Paper Applying Gibbs Sampling in inference the number of states of HMM is changeable in this algorithm, based on Dirichlet Proce(infinite HMMRefer to Beal s PaperApplying Gibbs Sampling in inferencethe number of states of HMM is changeable in this algorithm, based on Dirichlet Proce)
    2008-01-24 10:10:54下载
    积分:1
  • dft
    DFT的MATLAB实现,详细的给出了算法及分析(The DFT in MATLAB, gives a detailed algorithm and analysis)
    2012-04-30 17:05:11下载
    积分:1
  • CPPPremier
    C++Premier(中文第四版)学习C++的红宝书(C++Premier(Chinese 4th edition))
    2014-11-17 23:30:12下载
    积分:1
  • matlabgui1
    matlab gui..................(matlab gui.........................)
    2013-11-03 20:47:36下载
    积分:1
  • vcyumatlachulisartuxiang
    文章主要介绍了利用MATCOM进行VC和MATLAB 混合编程的步骤与优点, 并将其用于SAR 图像处理与质量评估软件开发。该软件通过图形与菜单, 界面用户只需进行简 单的菜单操作就可以得到直观的处理和评估结果, 为开展SAR 图像处理、质量评估研究提供了一个有力的工具。(Article introduces the use of MATCOM for VC++ and MATLAB programming steps and advantages of mixed and used in SAR image processing and quality assessment of software development. The software graphics and menus, just a simple user interface, menu operations can be intuitive handling and evaluation of results, for carrying out SAR image processing, quality assessment study provides a powerful tool.)
    2011-04-21 16:13:03下载
    积分:1
  • ldpc_generate
    matlab源代码,可能对研究LDPC码的同仁是有很大帮助的(matlab source code, may be the study of Tongren LDPC code is of great help)
    2008-07-07 14:37:57下载
    积分:1
  • matlab
    这个同样是利用matlab编程,结合matlab遗传算法工具箱来实现遗传算法的功能(Matlab this is to use the same programming, combined with genetic algorithm matlab genetic algorithm toolbox to achieve the function of)
    2009-04-11 15:43:00下载
    积分:1
  • Mechanical-design
    机械设计Matlab实现,如连杆机构的结构设计,槽轮机构的机构设计(Mechanical design and Matlab implementation, such as the linkage structure of grooved wheel mechanism design, mechanism design)
    2012-05-07 14:40:20下载
    积分:1
  • matlab_instruction
    中大数计的matlab的ppt,数学建模竞赛资料(The large numbers of dollars matlabppt)
    2014-01-22 16:45:54下载
    积分:1
  • winldap
    告诉你怎么通过WINLDAP进行LDAP的编程,可以实际运行.(tell you how through WINLDAP for LDAP programming, the actual operation.)
    2006-11-01 21:44:38下载
    积分:1
  • 696516资源总数
  • 106430会员总数
  • 0今日下载