DFS
AR94
爱∪
展开
-
hdu1312(DFS入门题)
#include #include #include #include #include using namespace std; int w,h,si,sj; char maze[25][25]; int forward[4][2]={-1,0,0,1,1,0,0,-1};//四个方向搜索 bool mark[25][25]; // 标记数组 int ans ,fla原创 2013-01-16 21:52:28 · 708 阅读 · 0 评论 -
hdu1241(DFS入门)
#include #include #include #include #include using namespace std; int m,n; char maze[110][110]; int forward[8][2]={-1,0,-1,1,0,1,1,1,1,0,1,-1,0,-1,-1,-1}; bool mark[110][110]; int ans,fl原创 2013-01-16 20:34:41 · 672 阅读 · 2 评论