图论基础UVA11624

#include
#include
#include
const int maxn=1010;
struct node{
	int x,y,s;
};
char str[maxn];
bool p[maxn][maxn],a[maxn][maxn];
int t[maxn][maxn],d[4][2]={{1,0},{0,1},{-1,0},{0,-1}};
struct node q[maxn*maxn];
void din(int i,int x1,int y1,int s1){
	q[i].x=x1;q[i].y=y1;q[i].s=s1;
}
int main(){
#ifndef ONLINE_JUDGE
	freopen("uva11624.in","r",stdin);
	freopen("uva11624.out","w",stdout);
#endif
	int i,j,k,k1,m,n;
	int xs,ys,e,T;
	int f,l,u,v,w;
	scanf("%d",&T);
	while(T--){
		memset(p,0,sizeof(p));
		memset(a,0,sizeof(a));		
		scanf("%d%d",&n,&m);
		for(i=1;i<=n;i++)
			for(j=1;j<=m;j++)
				t[i][j]=999999;
		f=0;l=0;
		getchar();
		for(i=1;i<=n;i++){
			gets(str);
			for(j=0;j


你可能感兴趣的:(程序代码,算法分享)