代码搜索:背包问题
找到约 10,000 项符合「背包问题」的源代码
代码结果 10,000
www.eeworm.com/read/214600/15093457
txt readme.txt
程序运行环境:Microsoft Visual C++ 6.0
编译运行步骤:直接编译,运行
程序功能:用加限界策略的优化回溯算法解决0/1背包问题
www.eeworm.com/read/214600/15093469
txt readme.txt
程序运行环境:Microsoft Visual C++ 6.0
编译运行步骤:直接编译,运行
程序功能:用回溯搜索算法解决0/1背包问题
www.eeworm.com/read/414450/11111681
muse p02.muse
#title P02: 完全<mark>背包问题</mark>
* 题目
有N种物品和一个容量为V的背包,每种物品都有无限件可用。第i种物品的费用是c[i],价值是w[i]。求解将哪些物品装入背包可使这些物品的费用总和不超过背包容量,且价值总和最大。
* 基本思路
这个问题非常类似于[[P01][01<mark>背包问题</mark>]],所不同的是每种物品有无限件。也就是从每种物品的角度考虑,与它相关的策略已并非取或不取两种,而是有取0件 ...
www.eeworm.com/read/279550/10421208
txt 背包问题 动态规划法.txt
#include
#include
//背包问题
/*
测试数据:
输入:
8 23
8 4 5 1 6 6 7 3
7 8 3 3 4 9 6 2
输出:
1 0 1 0 1 0 1 1
*/
int num,c;
int v[10];
int w[10];
int m[10][30];//设m[i][j],则表示在
www.eeworm.com/read/420516/10792234
cpp 1108 0-1背包问题.cpp
#include
#include
#include
int min(int w,int c)
{int temp;
if (wc)
www.eeworm.com/read/466339/7033995
cpp 回溯法解01背包问题.cpp
#include
#include
using namespace std;
/*
0-1<mark>背包问题</mark>也是一个子集选取问题。
为了便于计算上界函数,可先将物品依其单位重量价值从大到小排序
此后只要按顺序考察各物品即可。在实现时,由函数Bound来计算在当前结点处的上界
它是类Knap的私有成员。Knap的其它成员记录解空间树中的结点信息,以减少函 ...
www.eeworm.com/read/455594/7369754
txt 背包问题 动态规划法.txt
#include
#include
//背包问题
/*
测试数据:
输入:
8 23
8 4 5 1 6 6 7 3
7 8 3 3 4 9 6 2
输出:
1 0 1 0 1 0 1 1
*/
int num,c;
int v[10];
int w[10];
int m[10][30];//设m[i][j],则表示在
www.eeworm.com/read/442257/7656420
txt 背包问题算法的java实现 .txt
www.eeworm.com/read/325129/13225896
txt 动态规划求01背包问题.txt
#include
#include
#include
//goods是一个或多个物品的重量和价值
typedef struct goods
{
int weight;
int value;
} goods;
//用来定义一个queryList数组
//数组中的每个元素定义一趟需要记录的数
www.eeworm.com/read/487739/6508089