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

25792번 - Stone Smoothing 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB316626.087%

문제

You found a really sharp stone that could be described as a convex polygon. You decided to use some skills to make it smoother. You can “smooth” a corner (vertex) of the stone (polygon) by shaving it down some amount as long as you don’t smooth down another corner at the same time, i.e., only one corner can be smoothed at a time.

Note that, when one vertex (corner) is smoothed, it is replaced by two new vertices. So, if desired, these new vertices (corners) can be smoothed.

To make the smoothest stone, you have to ensure that the largest exterior angle of the polygon is as small as possible, after smoothing a given stone a fixed number of times.

Geometry Refresher: An exterior angle of a polygon is an angle at a vertex of the polygon, outside the polygon, formed by one side and the extension of an adjacent side. In other words, if the side of a polygon is extended, the angle formed outside the polygon is the exterior angle.

Given the shape of the stone described using xy-coordinates and the number of times the stone could be smoothed, determine the smallest possible value for the largest resulting exterior angle.

입력

The first input line contains two integers, C and S (1 ≤ C ≤ 5,000; 1 ≤ S ≤ 109), representing (respectively) the number of corners in the stone and the number of times the stone can be smoothed. Each of the following C input lines contains two integers, the ith of which are xi and yi (-100,000 ≤ xi, yi ≤ 100,000), representing the x coordinate and the y coordinate of the ith corner of the stone (the vertices of the polygon are given in clockwise order).

출력

Print on a single line by itself a single floating-point number: the minimum possible value for the largest exterior angle after performing all the smoothing. Answers within 10-6 absolute or relative of the expected answers will be considered correct.

제한

예제 입력 1

3 6
0 0
0 10
10 0

예제 출력 1

225.00000000000003

예제 입력 2

4 3
-1 1
1 1
1 -1
-1 -1

예제 출력 2

270.00000000000006

힌트

출처

University > University of Central Florida > 2022 Local Programming Contest (Qualifying Round) 9번

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

출처

대학교 대회

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

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