300809: CF154E. Martian Colony

Memory Limit:256 MB Time Limit:4 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Martian Colony

题意翻译

第一艘载有地球定居者的飞船降落在火星上。殖民者成功地在火星表面建立了$n$个必要的结构(可以看作是一个平面,而建筑可以看作是其上的点)。但有一天,扫描仪在殖民地的外围记录了可疑的活动。于是决定使用保护力场生成系统来保护殖民地免受可能的麻烦。 该系统的工作原理如下:表面上有许多力场的发生器(它们也可以被视为点)。每个发生器的活动范围是以发生器的位置为中心的半径为$r$的圆(圆的边界也包括在范围内)。系统被激活后,它只在所有发生器的活动范围内的表面部分伸展保护力场。也就是说,受保护的部分是发生器活动范围的交点。 殖民者可用的力场的发生器数量不受限制,但力场生成系统会消耗大量的能量。更确切地说,能量消耗并不取决于力场的发生器的数量,而是与被场保护的面积成正比。另外,所有的现有建筑物都必须位于保护区内。 确定包含所有建筑物的表面保护部分的尽可能小的面积。

题目描述

The first ship with the Earth settlers landed on Mars. The colonists managed to build $ n $ necessary structures on the surface of the planet (which can be regarded as a plane, and the construction can be regarded as points on it). But one day the scanners recorded suspicious activity on the outskirts of the colony. It was decided to use the protective force field generating system to protect the colony against possible trouble. The system works as follows: the surface contains a number of generators of the field (they can also be considered as points). The active range of each generator is a circle of radius $ r $ centered at the location of the generator (the boundary of the circle is also included in the range). After the system is activated, it stretches the protective force field only over the part of the surface, which is within the area of all generators' activity. That is, the protected part is the intersection of the generators' active ranges. The number of generators available to the colonists is not limited, but the system of field generation consumes a lot of energy. More precisely, the energy consumption does not depend on the number of generators, but it is directly proportional to the area, which is protected by the field. Also, it is necessary that all the existing buildings are located within the protected area. Determine the smallest possible area of the protected part of the surface containing all the buildings.

输入输出格式

输入格式


The first line contains two integers $ n $ and $ r $ ( $ 1<=n<=10^{5} $ , $ 1<=r<=50000 $ ) — the number of buildings and the active ranges of the generators, correspondingly. Next $ n $ lines contains the buildings' coordinates. The $ i+1 $ -th ( $ 1<=i<=n $ ) line contains two real numbers with at most three digits after the decimal point $ x_{i} $ and $ y_{i} $ ( $ |x_{i}|,|y_{i}|<=50000 $ ) — coordinates of the $ i $ -th building. It is guaranteed that no two buildings are located at the same point, and no two different buildings are located closer than $ 1 $ . It is guaranteed that there exists a circle with radius $ r $ that contains all the buildings.

输出格式


Print the single real number — the minimum area of the protected part containing all the buildings. The answer is accepted if absolute or relative error doesn't exceed $ 10^{-4} $ .

输入输出样例

输入样例 #1

3 5
0.00 0.000
0.0 8.00
6 8.00

输出样例 #1

78.5398163397

输入样例 #2

4 1000
0.0 0.0
0 2.00
2.00 2
2.0 0.00

输出样例 #2

4.0026666140

输入样例 #3

4 5
3.00 0.0
-3 0.00
0.000 1
0.0 -1.00

输出样例 #3

8.1750554397

说明

In the first sample the given radius equals the radius of the circle circumscribed around the given points. That's why the circle that corresponds to it is the sought area. The answer is $ 25π $ . In the second sample the area nearly coincides with the square which has vertexes in the given points. The area for the third sample is shown on the picture below. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF154E/a901b9df8ddeae6d9f0bd878416911f06566a2dc.png)

Input

题意翻译

第一艘载有地球定居者的飞船降落在火星上。殖民者成功地在火星表面建立了$n$个必要的结构(可以看作是一个平面,而建筑可以看作是其上的点)。但有一天,扫描仪在殖民地的外围记录了可疑的活动。于是决定使用保护力场生成系统来保护殖民地免受可能的麻烦。 该系统的工作原理如下:表面上有许多力场的发生器(它们也可以被视为点)。每个发生器的活动范围是以发生器的位置为中心的半径为$r$的圆(圆的边界也包括在范围内)。系统被激活后,它只在所有发生器的活动范围内的表面部分伸展保护力场。也就是说,受保护的部分是发生器活动范围的交点。 殖民者可用的力场的发生器数量不受限制,但力场生成系统会消耗大量的能量。更确切地说,能量消耗并不取决于力场的发生器的数量,而是与被场保护的面积成正比。另外,所有的现有建筑物都必须位于保护区内。 确定包含所有建筑物的表面保护部分的尽可能小的面积。

加入题单

算法标签: