文件名称:01beibaowenti
介绍说明--下载内容均来自于网络,请自行研究使用
给定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
问:应该如何选择装入背包的物品,使得背包中的物品的总价值最大?
输入:
第一行两个数,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