Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб. Use Classes to solve the problem, Prepared by Ibrahim Mesecan.
The Largest Rectangle
Question:
You will be given the coordinates of two corners of n rectangles.
Calculate and find the largest rectangle.
Input specification
In the first line, there will be an integer (n), the number of rectangles. Then in the
following n lines, you will have 4 integers (x1, y1, x2, y2) where x1 and y1 are the
coordinates of the first corner, and x2 and y2 are the coordinates of the second corner.
The x, y coordinates are integers between -10000 and 10000
and 1 < n ≤ 20000.
Output specification
Give area of the largest rectangle
area = abs(x1-x2) * abs(y1-y2)
Sample Input I
4
4 2 4 2
1 3 5 1
2 2 4 3
1 1 1 2
Sample Output I
8
|
Sample Input II
8
7 5 6 3
4 3 4 5
8 4 3 8
8 7 5 4
3 6 1 8
7 6 6 3
8 3 3 4
3 6 3 2
Sample Output II
20
|
Для отправки решений необходимо выполнить вход.
|