代码搜索:递归回溯
找到约 2,805 项符合「递归回溯」的源代码
代码结果 2,805
www.eeworm.com/read/389447/8519623
java fac5_11.java
//
//本程序取自王晓东编著“算法分析与设计”第 182 页,例
//电路板排列问题回溯解法
class Board{
static int n; //电路板数
static int m; //连接块数
static int[] x; //当前解
static int[] bestx; //当前最
www.eeworm.com/read/384690/8851001
java wine.java
/**
*883分酒问题回溯解法
* @author 小龙
*/
public class wine {
int state[][] = new int[10000][8];//状态集,state[i][7]表示步数,state[i][0]~state[i][6]表示cup的状态
int cup[] = {8, 8, 0, 0, 0, 0, 0};//将酒瓶、酒杯
www.eeworm.com/read/283541/9010465
cpp migong.cpp
//使用回溯法求解迷宫问题migong.cpp
#include
#include
#include
#include
//路口的结构体定义
typedef struct
{int left;
int forward;
int right;
}InterS;
//迷宫类定义与实现
c
www.eeworm.com/read/380114/9163061
txt migong.txt
//使用回溯法求解迷宫问题migong.cpp
#include
#include
#include
#include
//路口的结构体定义
typedef struct
{int left;
int forward;
int right;
}InterS;
//迷宫类定义与实现
c
www.eeworm.com/read/380114/9163066
cpp migong.cpp
//使用回溯法求解迷宫问题migong.cpp
#include
#include
#include
#include
//路口的结构体定义
typedef struct
{int left;
int forward;
int right;
}InterS;
//迷宫类定义与实现
c
www.eeworm.com/read/378375/9233605
java fac5_12.java
//本程序取自王晓东编著“算法分析与设计”第 185 页,例
//连续邮资问题的回溯解法
//
class Stamps
{
static int n; //邮票面值数
static int m; //每张信封允许贴的最多邮票数
static int maxR;
www.eeworm.com/read/378375/9233731
java fac5_12.java
//本程序取自王晓东编著“算法分析与设计”第 185 页,例
//连续邮资问题的回溯解法
//
class Stamps
{
static int n; //邮票面值数
static int m; //每张信封允许贴的最多邮票数
static int maxR;
www.eeworm.com/read/317815/7109836
0-1
#include
int c; //背包容量
int n; //物品数
int *w; //物品重量
int *p; //物品价值
int cw; //当前重量
int cp; //当前价值
int *choose; //当前装载情况
int bestp; //最优价值
int *bestc; //最优装载情况
//回溯
void back
www.eeworm.com/read/299227/7874561
cpp migong.cpp
//使用回溯法求解迷宫问题migong.cpp
#include
#include
#include
#include
//路口的结构体定义
typedef struct
{int left;
int forward;
int right;
}InterS;
//迷宫类定义与实现
c
www.eeworm.com/read/240259/13228722
cpp migong.cpp
//使用回溯法求解迷宫问题migong.cpp
#include
#include
#include
#include
//路口的结构体定义
typedef struct
{int left;
int forward;
int right;
}InterS;
//迷宫类定义与实现
c