- 博客(4)
- 收藏
- 关注
原创 dfs模板
#include<bits/stdc++.h> using namespace std; const int maxn=100; int vis[maxn][maxn]; // 访问标记 int mp[maxn][maxn]; // 坐标范围 int dir[4][2]= {{0,1},{0,-1},{1,0},{-1,0}}; // 方向向量,(x,y)周围的四个方向 bool ...
2019-03-19 21:44:47
317
原创 bfs模板
#include<bits/stdc++.h> using namespace std; const int maxn=100; bool vis[maxn][maxn]; // 访问标记 int dir[4][2]= {{0,1},{0,-1},{1,0},{-1,0}}; // 方向向量 struct State { // BFS 队列中的状态数据结构 int x,y; //...
2019-03-19 21:44:32
112
原创 带转弯问题的dfs(HDU - 1175&HDU - 1728)
连连看 Time Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) ...
2019-03-14 00:24:46
128
转载 HDU - 1426 Sudoku Killer
dfs题 查这题题解的时候,看到了一份大佬的代码,忍不住记录一下 不仅代码精简了很多,而且跑完只要140ms 原文地址 https://blog.youkuaiyun.com/nameofcsdn/article/details/52894275 Description 自从2006年3月10日至11日的首届数独世界锦标赛以后,数独这项游戏越来越受到人们的喜爱和重视。 据说,在2008北京奥运会上,会将数独列...
2019-03-11 22:20:15
122
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人