原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=1242代码:#include<iostream>#include<queue>#include<memory.h>using namespace std;int row,col;char map[201][201];int startX,startY,endX,endY;int dir[4][2]={{-1,0},{0,1},{1,0},{0,-1}};struct Node{ int x,y,count;};int visit[201][201];Node N, Read More
posted @ 2013-05-24 21:45
supersnow0622
Views(150)
Comments(0)
Diggs(0)
原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=1241代码:#include <iostream>using namespace std;int row,col;char map[101][101];int dir[8][2]={{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}};void dfs(int i,int j){ int newr,newc; map[i][j]='*'; for(int k=0;k<8;k++) { newr=i+dir[k] Read More
posted @ 2013-05-24 21:43
supersnow0622
Views(128)
Comments(0)
Diggs(0)
原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=1312代码:#include <iostream>using namespace std;int row,col;char map[101][101];int dir[8][2]={{-1,0},{1,0},{0,-1},{0,1}};int startX,startY;int count;void dfs(int i,int j){ int newr,newc; map[i][j]='#'; for(int k=0;k<8;k++) { newr=i+dir[k] Read More
posted @ 2013-05-24 21:41
supersnow0622
Views(161)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号