代码搜索:递归回溯

找到约 2,805 项符合「递归回溯」的源代码

代码结果 2,805
www.eeworm.com/read/339549/12226209

ppt 递归与回溯.ppt

www.eeworm.com/read/482925/6616263

cpp 递归回溯法.cpp

#include #include #include using namespace std; class Queen { public: Queen(int n) { size=n; x=new int[size+1]; sum=0; } bool place(int row)
www.eeworm.com/read/466339/7033981

cpp 递归法执行回溯.cpp

void Backtrack(int t) //t表示递归深度 { if(t>n) //n用来控制递归深度,即解空间树的高度 //t>n表示已经搜索到一个叶结点。此时由函数Output(x) //对得到的可行解x进行记录或输出处理。 { Output(x); } else { for(int i=f(n,t);i
www.eeworm.com/read/197075/8032550

txt 邮票问题(用递归回溯).txt

#include #include using namespace std; const int N = 6; //一共有N个数 int W[100] = { 0,5,10,12,14,18,20}; //这N个数的权值 const int MAXNUM = 6;
www.eeworm.com/read/197075/8032554

txt 子集和数的递归回溯.txt

#include #include using namespace std; const int N = 6; //一共有N个数 int W[100] = { 0,5,10,12,13,15,18}; //这N个数的权值 const int M = 30;
www.eeworm.com/read/197075/8032563

txt 哈密尔顿环递归回溯.txt

#include #include using namespace std; bool Graph[101][101]; //经过编程验证,全局数组默认赋值为0 int X[101]={0}; //解空间,记录结点的序号 const int N = 5; //结点的个数 bool check( int k
www.eeworm.com/read/197075/8032556

txt 图的着色问题的递归回溯.txt

//图的着色问题.参见算法基础和笔记 #include #include //c++标准程序库里p582,这个文件包括div函数可以求商(quotient)和余数(remainder) //n.残余, 剩余物, 其他的人, [数]余数v.廉价出售adj.剩余的, 出售剩书的)
www.eeworm.com/read/274446/10871522

txt 马踏棋盘.txt

1. 问题描述 写出一个回溯算法来求解马周游问题: 给出一个8 ╳ 8的棋盘,一个放在棋盘某个位置上的马(规定马的走法为走“日”)是否可以愉好访问每个方格一次,并回到起始位置上? 2. 回溯法的一般思路 对于马所在其中一格时,它可以走的位置有以下8种情况: ⑧ ① ⑦ ② 马 ⑥ ③ ⑤ ④ 所以对于每一个马所在的格子里,马可以走对应的8个方向。 用满8叉树,每一个子树 ...