标签:
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 8339 Accepted Submission(s):
4476
#include<stdio.h> #include<string.h> #define minn(a,b)(a<b?a:b) #define maxm(c,d)(c>d?c:d) int main() { int n,m,j,i,sum,maxx,maxy,minx,miny,x,y; while(1) { sum=0; minx=250;miny=250;maxx=-250;maxy=-250;//注意对maxx和maxy初值的赋值要大于体中要求的231 while(scanf("%d %d",&x,&y)!=EOF) { sum++; if(sum==1) { if(x==0&&y==0) return 0; } if(sum>1) { if(x==0&&y==0) break; } if(minx>x) minx=x; if(maxx<x) maxx=x; if(miny>y) miny=y; if(maxy<y) maxy=y; } printf("%d %d %d %d\n",minx,miny,maxx,maxy); } return 0; }
标签:
原文地址:http://www.cnblogs.com/tonghao/p/4548041.html