
DFS
ironcarrot
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
【DFS】N皇后问题
侵删。 #include #include int map[20][20],cnt; int ans[20] = {0},num,n; void dfs(int x,int y) { if(map[x][y]) return ; int i,xx,yy; if(x == n) { nu转载 2016-12-11 00:31:44 · 316 阅读 · 0 评论 -
【DFS】RED AND BLACK
//首先,这是一个模版题,顺便我也总结一下DFS //这题有点类似于BFS There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can mov原创 2016-12-06 02:08:47 · 324 阅读 · 0 评论 -
【DFS】Oil Deposits
//后面有我个人的想法和题目的分析 The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a g原创 2016-12-09 21:27:53 · 362 阅读 · 0 评论 -
【DFS】棋盘问题
//港道理,这个题一开始我是懵比的,为啥? //因为WA了,为什么WA,因为一开始的vis是一个二维数组... //不同行不同列,ex qs me!!?? 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input原创 2016-12-10 01:00:36 · 327 阅读 · 0 评论