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

5255번 - 2circles 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
4 초 128 MB6901398916.211%

문제

We will consider a convex polygon with N vertices. We wish to find the maximum radius R such that two circles of radius R can be placed entirely inside the polygon without overlapping.

입력

The first line of input contains the number N. Each of the next N lines contains a pair of integers xi, yi – representing the coordinates of the ith point, separated by space.

출력

You should output a single number R – the desired radius. Output R with a precision of 3 decimals. You will pass a test if the output differs from the true answer by at most 0.001.

제한

  • 3 ≤ N ≤ 50000
  • -107 ≤ xi ≤ 107
  • -107 ≤ yi ≤ 107
  • The points are given in trigonometric (anti-clockwise) order.

예제 입력 1

4
0 0
1 0
1 1
0 1

예제 출력 1

0.293

예제 입력 2

4
0 0
3 0
3 1
0 1

예제 출력 2

0.500

예제 입력 3

6
0 0
8 0
8 6
4 8
2 8
0 4

예제 출력 3

2.189

힌트

The maximum radius is obtained when the centers of the two circles are placed on one of the square's diagonals. The radius can be calculated exactly and it is:

\(\dfrac{\sqrt{2}}{2 \times (1 + \sqrt{2})} \approx 0.293\)

출처

Olympiad > Balkan Olympiad in Informatics > BOI 2011 1번

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

출처

대학교 대회

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

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