Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. Question by Ibrahim Mesecan.
The smallest rectangle
Question:
Your poor brother again is having trouble with
the math professor. Now he is given n points.
And, he has to find the smallest rectangle
that encapsulates all the points.
Input specification
You will be given an integer in the beginning:
the number of points (n). Then, in the following
n lines, you will be given (x, y) coordinates
of n points
where 0 ≤ n ≤ 20,000 and x y coordinates
are integers between -3e5 and +3e5.
Output specification:
Show x y coordinates of two corners (lower left corner
and upper-right corner).
Sample Input
6
10 6
12 8
16 10
14 14
15 12
13 12
|
Sample Output
10 6
16 14
|
Для отправки решений необходимо выполнить вход.
|