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

16339번 - Moving Furniture 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB247666.667%

문제

Binary Casino had been open nonstop for a long period of time. It desperately needed renovation as the substantial damage to its carpet and furniture did not look good. While renovation took place, four-legged game tables from all game rooms were deposited in a storage room.

Your task is not difficult. You were asked by your boss to move the game tables to the exactly same place where they were positioned before. Each game table desk is a square and the table legs are located exactly under the corners of the desk. A good thing is that there are small hollows made by the table legs in the carpet at places where the game tables were standing before renovation and you know how many tables were in the room. Another good thing is that your boss does not remember where exactly were the tables placed. The bad thing is that your boss knows the total area of all game tables in the room and insists on the number being preserved.

You have to use every hollow in the carpet to place the game tables, placing one table leg into each hole. The tables cannot overlap.

입력

The first line of input contains an integer N (1 ≤ N ≤ 3 · 103), the number of game tables. After that 4N lines follow, each containing two integers X and Y (−109 ≤ X, Y < 109) which represent coordinates of a hollow in the carpet. The hollows are listed in an arbitrary order and no two hollows may have the same coordinates.

출력

Output a single number – the sum of areas of all game tables in the room. The output will be considered correct if it differs by at most 10−3 from the correct answer.

제한

예제 입력 1

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

예제 출력 1

11

예제 입력 2

1
0 0
3 4
-1 7
-4 3

예제 출력 2

25.0000

힌트

출처

ICPC > Regionals > Europe > Central European Regional Contest > CTU Open Contest > CTU Open Contest 2018 F번

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

출처

대학교 대회

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

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