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

18383번 - TATCK 스페셜 저지다국어

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

문제

Last night Taliban attacked a police station. Afghan National Police fought them and repelled the attack by killing all of them. However, after the attack, Police forces noticed a strange pattern of tiny holes in the station’s wall. They decide to cover these holes by a kind of bulletproof sheet metal temporarily. These sheets are only in square shape in different sizes, so they should use them to cover near to each other holes. Therefore, they first disjoint the holes to N parts based on their distance from each other. Then calculate and select appropriate sheet metal to cover each part.

Write a program to find the area of the smallest square that will cover all the holes in a part.

입력

The first line contains a single integer N expressed in decimal without leading zeros, denoting the number of parts (Test Cases).

The subsequent lines describe the number of holes in each part and their location.

To better understand, each test case begins with a single line, containing a single integer N expressed in decimal without leading zeros, the number of holes to follow; each of the following N lines contains two integers x and y, both expressed in decimal without leading zeros, giving the coordinates of one of points:

  • N <= 30
  • -500 < x, y < 500

출력

Print, on a single line with two decimal places of precision, the area of the smallest square containing all your points.

An answer will be accepted if it lies within 0.1 of the correct answer.

제한

예제 입력 1

2
3
-1 -1
1 1
1 2
4
5 2
5 -2
-5 2
-5 -2

예제 출력 1

6.50
98.00

힌트

출처

ICPC > Regionals > Asia West Continent > Afghanistan > Asia-Kabul ICPC Regional Contest 2018 B번

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

출처

대학교 대회

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

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