登录
首页 » Visual C++ » 0

0

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

  • SmartTag
    Smarttag control manipulation
    2015-02-11 09:38:48下载
    积分:1
  • 15823_chat
    Window下的select方式网络程序的范例(Window select the mode network programming paradigm)
    2005-02-22 13:40:52下载
    积分:1
  • SVC_toolbox
    support vector clustering for Matlab tool box
    2020-10-05 19:37:38下载
    积分:1
  • Embedded-Control-Systems-in-CaMATLAB
    Embedded Control Systems in CC++ An Introduction for Software Developers Using MATLAB
    2013-01-23 03:13:18下载
    积分:1
  • LLMSSrarM
    LMS滤波器(最小均方误差滤波器),学学习现代数字信号处理理论的人应该用的上。 (Filter LMS (minimum mean square error filter), school learning modern digital signal processing theory should be used on.)
    2012-09-09 22:40:58下载
    积分:1
  • socketip
    说明:  利用设置网卡为混沌模式,采用原始套接字的方式截获发向本机的ip包,并分析包的类型,源ip地址,目的ip地址,传输层协议等(card installed for the use of Chaos mode, using original socket intercepted a way to the machine ip packet, analysis of packet types, source ip address, purpose ip address, such as transport protocol)
    2006-05-15 13:08:10下载
    积分:1
  • YJ12
    MATlab工具箱的多元优化求解问题,自己进行了一点更改,希望能够好用(MATlab optimization toolbox to solve diverse problems, themselves a little change in the hope of easy to use)
    2011-11-30 12:17:22下载
    积分:1
  • Folyd
    自己写的Floyd,没有理解Folyd的同学可以拿去参考一下啦!!!!(Wrote it myself Floyd, do not understand Folyd students can refer to you instead!!!!)
    2009-02-21 18:58:35下载
    积分:1
  • Visual-CPP_MATLAB
    vc++和matlab的图像处理应用程序,可以相互调用,属于混合编程的各个实例程序。(VC++ and MATLAB image processing applications, can call each other, belonging to the mixed programming various examples of procedures.)
    2012-01-02 20:12:03下载
    积分:1
  • ELcentro
    将ELCentro波的加速度时程转换成速度、位移时程(Converting the acceleration time history of ELCentro wave into velocity and displacement time history)
    2021-01-30 11:18:33下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载