Qiuqiqiu  
不管道路多么崎岖坎坷,我永远不停下追逐梦想的脚步!
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页

2012年2月11日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2653BFS+优先队列View Code 1 #include <cstdio> 2 #include <cstring> 3 #include <queue> 4 using namespace std; 5 const int N=100; 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][N];10 int n,m,p,t;11 阅读全文
posted @ 2012-02-11 22:25 Qiuqiqiu 阅读(307) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2579BFSView Code 1 #include <cstdio> 2 #include <cstring> 3 #include <queue> 4 using namespace std; 5 const int N=110; 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][15];10 int n,m,k;11 struct 阅读全文
posted @ 2012-02-11 21:13 Qiuqiqiu 阅读(232) 评论(0) 推荐(0) 编辑

2012年2月3日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2364BFS我的代码 1 #include <cstdio> 2 #include <cstring> 3 #include <queue> 4 using namespace std; 5 const int N=100; 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][4];10 int n,m;11 struct sta12 { 阅读全文
posted @ 2012-02-03 18:08 Qiuqiqiu 阅读(403) 评论(0) 推荐(0) 编辑

2012年2月1日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1045DFS我的代码 1 #include <stdio.h> 2 const int N=5; 3 char maze[N][N]; 4 int vis[N][N]; 5 int n,ans; 6 int ok(int x,int y) 7 { 8 if (maze[x][y]=='X') return 0; 9 int i;10 for (i=x+1;i<n && maze[i][y]!='X';i++)11 if (vis[i][y]) 阅读全文
posted @ 2012-02-01 14:45 Qiuqiqiu 阅读(182) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3713BFS我的代码 1 #include <stdio.h> 2 #include <string.h> 3 const int N=10000; 4 const int dx[4]={0,1,0,-1}; 5 const int dy[4]={-1,0,1,0}; 6 const char dd[5]="LDRU"; 7 int maze1[10][10],maze2[10][10]; 8 int vis[N],dir[N],fa[N],q[N],dir2[N] 阅读全文
posted @ 2012-02-01 00:28 Qiuqiqiu 阅读(401) 评论(0) 推荐(0) 编辑

2012年1月20日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=26122次bfs我的代码 1 #include <cstdio> 2 #include <cstring> 3 #include <queue> 4 using namespace std; 5 const int N=210,INF=1000000; 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][2],dis[N][N][2];1 阅读全文
posted @ 2012-01-20 21:39 Qiuqiqiu 阅读(223) 评论(0) 推荐(0) 编辑

2012年1月18日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1254BFS+DFS我的代码 1 #include <cstdio> 2 #include <cstring> 3 #include <queue> 4 using namespace std; 5 const int N=10; 6 const int dx[4]={0,1,0,-1}; 7 const int dy[4]={1,0,-1,0}; 8 int maze[N][N],maze2[N][N],vis2[N][N],vis[N][N][N][N]; 9 int 阅读全文
posted @ 2012-01-18 16:24 Qiuqiqiu 阅读(260) 评论(0) 推荐(0) 编辑

2012年1月16日

摘要: 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 阅读全文
posted @ 2012-01-16 22:31 Qiuqiqiu 阅读(214) 评论(0) 推荐(0) 编辑
 
摘要: 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] 阅读全文
posted @ 2012-01-16 13:57 Qiuqiqiu 阅读(237) 评论(0) 推荐(0) 编辑

2012年1月15日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1240bfs我的代码 1 #include <cstdio> 2 #include <cstring> 3 #include <queue> 4 using namespace std; 5 const int N=15; 6 const int dx[6]={1,0,0,-1,0,0}; 7 const int dy[6]={0,1,0,0,-1,0}; 8 const int dz[6]={0,0,1,0,0,-1}; 9 struct coor10 {11 int x 阅读全文
posted @ 2012-01-15 20:31 Qiuqiqiu 阅读(179) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页