#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <string>
#include <string.h>
#include <vector>
#include <queue>
#include <stack>
#include <sstream>
using namespace std;
//1020
int a,b;
int main(){
int xmin,ymin,xmax,ymax;
//freopen("input.txt","r",stdin);
while(cin>>a>>b&&(a!=0||b!=0)){
xmin=xmax=a,ymin=ymax=b;
while(cin>>a>>b&&(a!=0||b!=0)){
if(xmin>a) xmin=a;
if(xmax<a) xmax=a;
if(ymin>b) ymin=b;
if(ymax<b) ymax=b;
}
cout<<xmin<<" "<<ymin<<" "<<xmax<<" "<<ymax<<endl;
}
return 0;
}
/**************************************************************
Problem: 1020
User: cust123
Language: C++
Result: Accepted
Time:10 ms
Memory:1520 kb
****************************************************************/
题目1020:最小长方形
最新推荐文章于 2020-05-19 22:10:39 发布