HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Search > problem:


50980 - The smallest rectangle

Guest
• Review clarifications (1)

Section problems

• 50859 - Low performance
• 50785 - Swimming Contest
• 50826 - Olive Containers
• 50866 - Buy the cheapest
• 50999 - Overlapping Trips
• 50507 - Sequential Numbers
• 50501 - The Highest Average
• 50434 - Row Min Subtraction
• 50980 - The smallest rectangle
• 50860 - Number of Student Certificates
• 50832 - Rock Paper Scissors Lizard ...
• 50834 - The train which leaves the f...
• 51078 - Max trade
• 51056 - Welcome Picnic
• 51055 - The competition
• 51077 - Grades Histogram
• 51057 - Number of students

Feedback

If you notice incorrect translations in Contester, please let author know.

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



Для отправки решений необходимо выполнить вход.

www.contester.ru