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

21990번 - Fiber Shape 스페셜 저지다국어

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

문제

Imagine a board with $n$ pins put into it, the $i$-th pin is located at $(x_i, y_i)$. For simplicity, we will restrict the problem to the case where the pins are placed in vertices of a convex polygon.

Then, take a non-stretchable string of length $l,ドル and put it around all the pins. Place a pencil inside the string and draw a curve around the pins, trying to pull the string in every possible direction. The picture below shows an example of a string tied around the pins and pulled by a pencil (a point $P$).

Your task is to find an area inside this curve. Formally, for a given convex polygon $S$ and a length $l$ let's define a fiber shape $F(S, l)$ as a set of points $t$ such that the perimeter of the convex hull of $S \cup \{t\}$ does not exceed $l$. Find an area of $F(S, l)$.

입력

The first line contains two integers $n$ and $l$ (3ドル \le n \le 10^4$; 1ドル \le l \le 8 \cdot 10^5$) --- the number of vertices of the polygon $S$ and the length of the string. Next $n$ lines contain integers $x_i$ and $y_i$ ($-10^5 \le x_i, y_i \le 10^5$) --- coordinates of polygon's vertices in counterclockwise order. All internal angles of the polygon are strictly less than $\pi$. The length $l$ exceeds the perimeter of the polygon by at least 10ドル^{-3}$.

출력

Output a single floating-point number --- the area of the fiber shape $F(S, l)$. Your answer will be considered correct if its absolute or relative error doesn't exceed 10ドル^{-6}$.

제한

예제 입력 1

3 4
0 0
1 0
0 1

예제 출력 1

3.012712585980357

예제 입력 2

4 5
0 0
1 0
1 1
0 1

예제 출력 2

5.682061989789656

예제 입력 3

5 17
0 0
2 -1
3 0
4 3
-1 4

예제 출력 3

37.719371276930820

노트

The following pictures illustrate the example tests.

출처

ICPC > Regionals > Northern Eurasia > Northern Eurasia Finals > Northern Eurasia Finals 2020 (Offline) F번

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

출처

대학교 대회

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

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