摘要: 广搜。看代码~#include <iostream>using namespace std;char s[102][102];void visit(int a,int b){ s[a][b]=0; int i,j; for(i=a-1;i<=a+1;i++) for(j=b-1;j<=b+1;j++) if(s[i][j]==-1) visit(i,j);}int main(){ int i,j,m,n,t; char str[102]; while(cin>>m>>n && (m||n)... 阅读全文
posted @ 2013-02-17 11:48 SF-_- 阅读(216) 评论(0) 推荐(0) 编辑