RiseOJ는 solved.ac와 제휴 관계가 없습니다. 티어 아이콘 © solved.ac. solved.ac
포럼
COCI00480

Cover

Unrated 레이팅 미적용
난이도
1s
시간 제한
64MB
메모리 제한
0
맞았습니다!!
0
제출 수
0.0%
정답률
레이팅

의견: 0

설명

1 \(s / 64\) \(MB / 120\) points

You are given \(N\) points in the coordinate system. They need to be covered with one or more

rectangles, such that the following conditions are met:

The sides of each rectangle are parallel with the coordinate axes,

The center of each rectangle is in the origin, i.e. point (0, 0),

Each given point is located either inside of the rectangle or on its boundaries.
Of course, it is possible to cover all the points using only one rectangle, but this rectangle

could have a very large surface area. Our goal is to find a selection of required rectangles

such that the sum of their surface areas is minimal.

제약

In test cases worth 40% of total points, it will hold \(N\) ≤ 20.

입력 형식

The first line of input contains the integer \(N\) (1 ≤ \(N\) ≤ 5000), the number of points.
Each of the following \(N\) lines contains two integers \(X\) and \(Y\) (-50 000 000 ≤ X, \(Y \le 50\,000\)

000, \(XY\) ≠ 0), the coordinates of each point.

출력 형식

You must output the required minimal sum of surface areas of the rectangles.

예제 1
입력
2
1 1
-1 -1

3
-7 19
9 -30
25 10

6
1 20
3 17
5 15
8 12
9 11
10 10
출력
output
output
4

2080

760
설명

Clarification of the first test case: We choose the rectangle whose opposite angles are the given

points, since it meets the conditions from the task.
Clarification of the second test case: We choose two rectangles with their centers in the origin. The

first is of dimensions 50 x 20 and covers point (25, 10). The second is of dimensions 18 x 60 and

1 s / 64 MB / 120 points

covers the first two points. If we wanted to cover all the points using one rectangle, it would be of

dimensions 50 x 60.

문제 정보

생성자가 기록되지 않았습니다.

출처 COCI 2017/2018 Contest 6

평가 및 의견

Cover

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 50 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

Cover

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8