![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM/搜索
一般帅吧
这个作者很懒,什么都没留下…
展开
-
DFS-Sudoku(poj2676)
#include <iostream> #include <cstring> #include <cstdio> using namespace std; int map[10][10], hang[10][10], lie[10][10], kuai[10][10], cnt; int cal(int i, int j)//输入行列号,判断他在哪一块里 { ...原创 2018-12-08 15:04:50 · 111 阅读 · 0 评论 -
BFS+状态压缩-Maze(hdu5094)
This story happened on the background of Star Trek. Spock, the deputy captain of Starship Enterprise, fell into Klingon’s trick and was held as prisoner on their mother planet Qo’noS. The captain of...原创 2018-12-08 15:54:39 · 120 阅读 · 0 评论 -
DFS-棋盘问题(poj1321)
在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 , k <= n...原创 2018-12-08 15:52:25 · 142 阅读 · 0 评论 -
BFS+状态压缩-Stealing Harry Potter's Precious (hdu4771)
Harry Potter has some precious. For example, his invisible robe, his wand and his owl. When Hogwarts school is in holiday, Harry Potter has to go back to uncle Vernon's home. But he can't bring his pr...原创 2018-12-08 16:10:13 · 123 阅读 · 0 评论