标签:
Description
Input
Output
Sample Input
12 56 23 56 13 10 0 0 12 34 0 0 0 0
Sample Output
12 10 23 56 12 34 12 34
#include <iostream> #include <cmath> #include <cstdio> using namespace std; int main() { int x,y; while(cin>>x>>y) { if(x==0&&y==0) break; int x1,y1,x2,y2; x1=x;y1=y; x2=x;y2=y; while(cin>>x>>y) { if(x==0&&y==0) break; if(x<=x1) x1=x; if(y<=y1) y1=y; if(x>=x2) x2=x; if(y>=y2) y2=y; } cout<<x1<<" "<<y1<<" "<<x2<<" "<<y2<<endl; } return 0; }
标签:
原文地址:http://www.cnblogs.com/nefu929831238/p/5901994.html