题号:NC233770
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld
题目描述
Jerome just got several large houses as his 18th birthday gifts. To decorate one of these houses, he intends to place several carpets in his house. The house is so large that he can't find a carpet which can cover the whole house. He'll book three identical cycle carpets with the radius rr. He is unwilling to fold his carpet. So the carpets can't exceed the house. If the center coordinates of the three carpets are
%2C(x_2%2Cy_2)%2C(x_3%2Cy_3))
.
)
is the value of the first carpet.
)
is the second one's value. And
)
is the third one's. He will pay

for these carpets. Jerome is so rich that he wants to maximize his cost. You can just consider this house as a CONVEX polygon.
输入描述:
One integer
)
in the first line. Indicate the number of the test cases.
In every case:
Two integers in the first line
)
. Indicate the number of vertexes of the polygon and the radius mentioned above.

pairs of integers
)
in next

lines. Indicate the vertexes of the polygon.
Coordinates of all vertexes are different, and adjacent walls of the room are not collinear.
The vertexes are listed in clockwise order.
输出描述:
lines, output the maximum cost Jerome can pay in each line.
The input data guarantees that the cost is more than
.
Let the maximum cost is
, and your answer's cost is
. Your answer will be considered as correct if and only if
.
示例1
输入
复制
2
5 2
-2 0
-5 3
0 8
7 3
5 0
4 1
0 0
0 3
3 3
3 0