[恢]hdu 1859
2011-12-21 02:10:08
地址:http://acm.hdu.edu.cn/showproblem.php?pid=1859
题意:中文。每次更新就OK。
代码:
# include <stdio.h>
int min(int a, int b){return a<b?a:b;}
int max(int a, int b){return a>b?a:b;}
int main ()
{
int x, y, l, r, t, d ;
while (scanf ("%d%d", &x, &y) && (x||y))
{
l = r = x, t = d = y ;
while (scanf ("%d%d", &x, &y) && (x||y))
{
l = min(x, l) ;
r = max(x, r) ;
t = min(y, t) ;
d = max(y, d) ;
}
printf ("%d %d %d %d\n", l, t, r, d) ;
}
return 0 ;
}