摘要:
http://acm.hdu.edu.cn/showproblem.php?pid=2822BFS+优先队列我的代码 1 #include <cstdio> 2 #include <cstring> 3 #include <queue> 4 using namespace std; 5 const int N=1010; 6 const int dx[4]={0,1,0,-1}; 7 const int dy[4]={1,0,-1,0}; 8 char maze[N][N]; 9 int vis[N][N],dis[N][N];10 int m,n;11 s
阅读全文
摘要:
http://acm.hdu.edu.cn/showproblem.php?pid=2216BFS我的代码 1 #include <cstdio> 2 #include <cstring> 3 #include <cstdlib> 4 #include <queue> 5 using namespace std; 6 const int N=25; 7 const int dx[4]={0,1,-1,0}; 8 const int dy[4]={1,0,0,-1}; 9 char maze[N][N];10 int vis[N][N][N][N]
阅读全文