摘要:
DFS求连通分量。水题~1562/*8737028 MDK 1562 Accepted 712K 32MS G++ 1998B 2011-06-07 22:06:51 */struct fix{ int x,y;};int n,m,tim,sti,stj;bool isescape=0;char mat[MAXN][MAXN],v[MAXN][MAXN];fix p[]={{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}};//周围8方向void dfs(int x,int y){ mat[x][y]='*'; for( 阅读全文
posted @ 2011-06-07 22:23 MDeath-Kid 阅读(326) 评论(0) 推荐(0) 编辑