一直显示wrong
#include<stdlib.h>
#include<stdio.h>
#include<string>
#include<cstring>
#include<algorithm>
#include<math.h>
#include<queue>
using namespace std;
typedef struct
{
int x,y;
}point;
bool cmp1(point a,point b)
{
return a.x<b.x;
}
bool cmp2(point a,point b)
{
return a.y<b.y;
}
point p[100];
int main()
{
int i,j,a,b,l;
while(scanf("%d %d",&a,&b)!=EOF&&a!=0&&b!=0)
{
if(a>=231) a=230;
if(a<=-231) a=-230;
if(b>=231) b=230;
if(b<=-231) b=-230;
l=0;
p[l].x=a;
p[l++].y=b;
while(scanf("%d %d",&a,&b)!=EOF&&a!=0&&b!=0)
{
if(a>=231) a=230;
if(a<=-231) a=-230;
if(b>=231) b=230;
if(b<=-231) b=-230;
p[l].x=a;
p[l++].y=b;
}
sort(p,p+l,cmp1);
int minx=p[0].x,maxx=p[l-1].x;
sort(p,p+l,cmp2);
int miny=p[0].y,maxy=p[l-1].y;
printf("%d %d %d %d\n",minx,miny,maxx,maxy);
}
}