1 //也是简单题,因为n太小,故暴力之! 2 3 4 #include5 #include 6 #include 7 #define max 45 8 9 char map[max][max];10 11 int dis(int x1,int y1,int x2,int y2){12 return fabs(x1-x2*1.0)+fabs(y1-y2*1.0);13 }14 15 int main(){16 int n,m;17 while(~scanf("%d%d",&n,&m)){18 if(n==0&&m==0){19 break;20 }21 getchar();22 for(int i=0;i res){39 ans=res;40 x1=i; y1=j;41 x2=k; y2=h;42 }43 }44 }45 }46 }47 printf("%d %d %d %d\n",x1,y1,x2,y2);48 }49 }