logo AlgoBeat OnlineJudge
登录 注册

#212979. [NERC 2020] Fiber Shape

内存限制:512 MiB 时间限制:3000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

Imagine a board with pins put into it, the -th pin is located at . 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 , 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 ).

Your task is to find an area inside this curve. Formally, for a given convex polygon and a length let's define a as a set of points such that the perimeter of the convex hull of does not exceed . Find an area of .

输入格式

The first line contains two integers and (; ) --- the number of vertices of the polygon and the length of the string. Next lines contain integers and () --- coordinates of polygon's vertices in counterclockwise order. All internal angles of the polygon are strictly less than . The length exceeds the perimeter of the polygon by at least .

输出格式

Output a single floating-point number --- the area of the fiber shape . Your answer will be considered correct if its absolute or relative error doesn't exceed .

样例

样例输入 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.