文件名称:01beibaowenti

  • 所属分类:
  • 其他小程序
  • 资源属性:
  • [Text]
  • 上传时间:
  • 2012-11-26
  • 文件大小:
  • 1kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • W*
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

给定n种物品和一前包.物品i的重量是Wi,其价值是Vi,背包的容量是C.

问:应该如何选择装入背包的物品,使得背包中的物品的总价值最大?

输入:

第一行两个数,n c.n是整数且小于11,c是实数,n和c之间空格

以下是n行,每行是两个实数,分别是各个物品的重量和价值

输出:两行

背包剩余重量 所装物品价值和(均保留两位小数)

所选择物品的编号,由空格间隔-Given n kinds of goods and a pre-pack. Item i of the weight of Wi, its value is Vi, the capacity of backpack C. Q: How should I choose the items into backpacks, making the items in the backpack of the total value of the largest? Input: the first line of two numbers, n cn is an integer and less than 11, c is a real number, n, c The following is n spaces between the lines, each line are two real numbers, respectively, the weight and value of each output: the remaining two lines of the weight of the loaded backpack, and the value of goods (both retain two decimal places) numbers selected items from the space interval
(系统自动生成,下载前可以参看下载内容)

下载文件列表

新建文本文档.txt

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org