Logo
(追記) (追記ここまで)

31751번 - Almost Aligned 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1.5 초 1024 MB76312037.736%

문제

A meteor shower is about to happen! As the enthusiastic astronomy photographer that you are, you want to take a single picture of all the meteors that will be part of the phenomenon. Not only that, you want to take the best possible picture. You know that the smaller the area of the photo, the better the picture. But how small can you make the picture to capture them all?

You can take a picture of any rectangular region of your camera’s view, but you cannot rotate the camera. That is, your photo can be any axis-aligned rectangle. The challenge? The meteors are constantly moving. Think of time ($t$) as the number of seconds that have passed since the start of the meteor shower. Your goal is to find a non-negative value of $t$ at which you can capture every single meteor with the smallest possible rectangle. A photo captures all the meteors within the rectangle, including those on the border.

입력

The first line contains an integer $N$ (1ドル ≤ N ≤ 10^6$) indicating the number of meteors.

Each of the next $N$ lines describes a meteor with four integers $X,ドル $Y,ドル $V_X$ and $V_Y$ ($-10^9 ≤ X, Y, V_X, V_Y ≤ 10^9$), representing the location and velocity of the meteor, as seen by your camera. This means that at any time $t ≥ 0$ the coordinates of the meteor are $(X + t \cdot V_X, Y + t \cdot V_Y$). If $t < 0$ the location of the meteor is undefined.

출력

Output a single line with the minimum area of an axis-aligned rectangle containing all the meteors at a time $t ≥ 0$. The output must have an absolute or relative error of at most 10ドル^{-9}$.

제한

예제 입력 1

4
0 0 10 10
0 0 10 10
10 10 -10 -10
10 0 -20 0

예제 출력 1

22.2222222222222

예제 입력 2

3
0 -1 0 2
1 1 1 1
-1 1 -1 1

예제 출력 2

0

예제 입력 3

3
0 -1 0 -2
1 1 1 1
-1 1 -1 1

예제 출력 3

4

예제 입력 4

1
0 0 0 0

예제 출력 4

0

힌트

출처

ICPC > Regionals > Latin America > Latin America Championship > The 2024 ICPC Latin America Championship A번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /