登录
首页 » Visual C++ » 0

0

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

  • fftshift
    主要是用c语言实现matlab中的fftshift函数的,(Mainly used c language matlab in fftshift function,)
    2013-09-22 14:57:46下载
    积分:1
  • VB
    说明:  基于VB与MATLAB的数字图像处理软件设计(VB and MATLAB-based digital image processing software design)
    2013-03-02 21:05:25下载
    积分:1
  • vector_4
    with study image process sample program
    2015-02-21 15:33:29下载
    积分:1
  • StarRat
    START RAT远控源码START RAT远控源码START RAT远控源码START RAT(START START RAT RAT far point source code remote control the source code START START RAT RAT far point source code)
    2014-02-25 09:10:34下载
    积分:1
  • matlab-thin
    自己写的matlab写的细化程序,特别针对条形的图形(Matlab write their detailed written procedures, especially for bar graph)
    2011-11-29 19:24:10下载
    积分:1
  • gfyfytygugytyfuyftrdtfy
    matlab and vc used by program and application
    2010-03-04 00:37:29下载
    积分:1
  • knn
    lassification som reseau
    2012-03-27 11:13:29下载
    积分:1
  • ch1545kl
    说明:  ec生物信息与论文实现\matlab教程及工具箱(ec biological information and papers to achieve \ Directory and Matlab Toolbox)
    2006-03-15 21:14:45下载
    积分:1
  • envelop_by_xcorr
    Matlab 自相关方法求声音信号包络源代码及说明(Method Matlab autocorrelation envelope of the voice signal and note the source code)
    2009-04-26 11:39:59下载
    积分:1
  • jishiqi
    动态倒计时牌,目标时间(即倒计时截至时间)的年、月、日、时、分、秒以及倒计时主题可以根据不同主题由用户动态设定,并且在此设定基础上在屏幕上显示距离相关主题到达之时还有n年、n天和n秒(其中的三个n各不相同,且随着程序运行动态变化),以北京时间作为主要显示板块,同时显示纽约、伦敦时间的附加倒计时板块。程序中除了刚运行时给出一次当前标准时间值(或读出系统当前时间)外,在程序运行期间应在自己独立的用户时钟控制下,而不受外界输入影响和系统时间的束缚。(Dynamic countdown, the target time (ie, as the countdown time) of the year, month, day, hour, minute, second, and the countdown theme can set different themes by the users, and in this setting is displayed on the screen on the basis of distance-related There are n the theme of the time of arrival, n day n seconds (one of the three different n, and with the dynamic program runs), to Beijing as the main display section, also shows New York, London time, the additional countdown Plate. In addition to just run the program once the current standard time value is given (or read the current system time), but during the program should be independent in their own under the control of the user clock, and free from outside influence and input system time constraints. )
    2011-05-07 17:14:32下载
    积分:1
  • 696518资源总数
  • 106155会员总数
  • 8今日下载