Qiuqiqiu  
不管道路多么崎岖坎坷,我永远不停下追逐梦想的脚步!

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) 编辑