登录
首页 » Visual C++ » 0

0

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

  • Matlab与VC CBuilder混合编精选
    说明:  本套资料,包含了各种Matlab和C++混合编程的例子和理论.是研究Matlab 和VC CBuilder的最权威和经典的例子.在网上搜集的时候发了一个下午的时间。结果发现内容太少了.不得不到我们学校的图书馆去找了。找遍了整个中国期刊全文数据库(CJFD),才找到了这几篇对与编程人员来说的有帮助和参考的文章了。发了我好几块钱了,希望对那些Matlab与Vc和Cbuilder混合编程的人员有很大的帮助了.(the sets of data, including a variety of mixed Matlab and C programming examples and theory. Research VC CBuilder Matlab and the most authoritative and classic examples. The online collection of hair at a time. The results showed very little content. Our school had to find a library. Grateful the entire CJFD (CJFD), they will find this program with a few pairs of officers help and reference of the article. I made a few good money in the hope that those with vitamin C and Matlab Cbuilder mixed programming staff have great help.)
    2005-12-01 12:38:38下载
    积分:1
  • 2002063920060390MATLABjihe
    图象处理基础算法原代码MATLAB 集合。(image processing algorithms based on the original MATLAB code set.)
    2006-12-13 15:15:50下载
    积分:1
  • 17686393RS_coding
    RS码是一种纠错能力很强的编码,对RS码具有进一步分析(RS code is a very strong error correction coding, with a further analysis of the RS code)
    2011-10-31 19:25:05下载
    积分:1
  • magnet_test_code
    matlab自动代码生成的源程序,和飞思卡尔mc9s12dg128集成(matlab code)
    2013-08-21 14:24:05下载
    积分:1
  • SURFmex
    matalab调用C程序实现的基于SURF算法的全景图像拼接(matalab call C SURF algorithm based Program for panoramic image stitching)
    2011-05-03 08:30:54下载
    积分:1
  • FTPClient
    File Transfer application
    2015-02-03 03:34:36下载
    积分:1
  • Meanshif-Detection
    说明:  :Mean—shift算法是一种非参数密度估计算法,可以实现快速的最优匹配,在目标的实时跟踪领域起着非常 重要的作用。为了有效的将Mean—shift算法应用到灰度图像中,采用了以方向直方图建立目标模型的策略,提出了在灰 度图像中以Mean—shift为核心的目标跟踪算法。实验结果表明,该算法具有不受光照条件影响的优点,在低对比度的情 况下仍能实现稳定、实时的跟踪目标。(: Mean-shift algorithm is a nonparametric density estimation algorithm, the optimal matching can be fast, real-time tracking fields in the target plays an important role. In order to effectively Mean-shift algorithm will be applied to the gray image, the histogram used to establish the direction of the strategy target model is proposed in the gray image to Mean-shift tracking algorithm as the core. Experimental results show that the algorithm has the advantage of not lighting conditions, in the case of low contrast can still achieve stability, real-time tracking of targets.)
    2011-04-06 23:14:05下载
    积分:1
  • display
    利用matlab编写的程序,用于音乐播放青花瓷(the function to display songs based on matlab)
    2012-11-02 10:55:47下载
    积分:1
  • hzt-report
    关于恶意代码检测和LTE网络,4G的LTE-A网络的外语文章(Foreign-language article about malicious code detection and lte network, lte-a network of 4g)
    2014-01-02 18:04:43下载
    积分:1
  • ChildFrm
    The first scheme is based on the spatial locality of feature vectors corresponding to similar images. Learning is effected by modifying the query vector to incorporate the positive examples. The second scheme is based on “distorting” our view of the feature space. An new similarity distance between an image and the query is learned from the relevance feedback.
    2009-11-23 06:51:13下载
    积分:1
  • 696524资源总数
  • 103957会员总数
  • 51今日下载