-
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)
- 2009-07-01 23:07:01下载
- 积分:1
-
MatlabandVCinterfacesinimageanddataprocessing
Matlab与VC接口在图像及数据处理中的应用,需要的下(Matlab and VC interfaces in image and data processing needs of next)
- 2010-05-08 11:59:14下载
- 积分:1
-
BP
说明: 这是一种BP神经网络的的MATLAB的代码有用请下载(if it help,please go ahead)
- 2014-09-14 18:28:58下载
- 积分:1
-
Digital-filtering-experiment
由设计要求可知,wp<=0.2π,允许误差幅度小于1dB,ws>=0.3π内衰减应大于15dB。为了验证数字滤波器的实际滤波功能,设计程序时,把输入序列定为验证函数x(t)=4sin(100πt)以及x(t)=4sin(200πt)和x(t)=4sin(400πt)。又因为Ts=1.25ms,T=80ms,故采样点为64,即N=64,所以当M=6,可以同时调试并验证程序的滤波功能。(Seen by the design requirements, wp < = 0.2π, allow a margin of error of less than 1dB, ws> = 0.3π within attenuation greater than 15dB. In order to verify the actual filtering function of the digital filter design program, the input sequence as validation function x (t) = 4sin (100πt) and x (t) = 4sin (200πt) and x (t) = 4sin (400πt) . And because Ts = 1.25ms, T = 80ms, so the sampling points is 64, that is N = 64, so when M = 6, can debug and validate filtering program.)
- 2014-12-24 09:34:43下载
- 积分:1
-
simulink
全面、专业的介绍matlab中模块mulink模块的使用方法,列举的例题包含操作流程,非常实用。(Comprehensive, professional introduction matlab in Ostrava mulink modules to use, citing the examples include operating procedures, very practical.)
- 2013-07-21 16:43:57下载
- 积分:1
-
PSD
这是一个用matlab编的遗传算法问题。这是一个用matlab编的遗传算法问题。(MATLAB genetic algorithm toolbox and its application, pdg format.)
- 2010-05-10 16:08:01下载
- 积分:1
-
PSK_encode_decode
本源码通过声音传通数据,将数据调制二进制PSK(即BPSK)信号从喇叭发出来,另外一个接收程序接收到声音后,便可以解码出来,用到的技术有PSK编码、PSK解码、Windows录音,为了防止传输过程中出现的误,本原码采用rss纠错码,使得通讯更加稳定可靠。(The Source by voice through the data, binary modulation PSK (ie, BPSK) signals emitted the speaker, the other receiving program after receiving the sound, you can decode it, the techniques used have PSK encoding, PSK decoding, Windows Recording in order to prevent accidental transmission occurs, the primitive code using rss error correction code, making communications more reliable.)
- 2015-04-03 13:58:41下载
- 积分:1
-
pso-svm one output
实现多输入单输出的预测功能,预测精度高,程序操作简单,易于修改应用。(The prediction function of multi input and single output is realized. The prediction accuracy is high, the program operation is simple, and it is easy to modify the application.)
- 2017-09-26 16:01:40下载
- 积分:1
-
The-CPP-Programming-Language
The C++ Programming Language(Bjarne Stroustrup著) 书中第五部分附录及代码(The C++ Programming Language Calculation Codes)
- 2014-01-06 12:35:27下载
- 积分:1
-
VC++.doc
VC++环境下调用MATLAB,其中路径的设置请根据自己电脑中的位置做相应修改(VC++ Environment called MATLAB, which set up the path, please according to their own computers make consequential amendments to the location of)
- 2008-05-07 13:17:18下载
- 积分:1