Falfa with Polygon
题号:NC239337
时间限制:C/C++/Rust/Pascal 3秒,其他语言6秒
空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M
Special Judge, 64bit IO Format: %lld

题目描述

Falfa is studying computational geometry recently, and she came up with an interesting idea:

Give a n-point-convex on the Cartesian plane and a constant k. You can choose any k points from the given points and these points will compose a sub-convex of the given convex. Falfa wants to find the k-point-subconvex with maximum perimeter.

Can you help her find it?

输入描述:

The first line contains 2 integers n and k(), as the legend.

The i-th of the next n lines contains two integers x_i and y_i (), representing the coordinate of the i-th point of the convex.

It is guaranteed that the points of the convex will be given in clockwise or counterclockwise order.

输出描述:

Output a real number representing the answer.

Your answer is considered correct if its absolute or relative error does not exceed .

Formally, let your answer be a, and the jury's answer be b. Your answer is accepted if and only if .
示例1

输入

复制
4 3
1.00 1.00
1.00 -1.00
-1.00 -1.00
-1.00 1.00

输出

复制
6.828427125
示例2

输入

复制
8 3
1.00 2.00
2.00 1.00
2.00 -1.00
1.00 -2.00
-1.00 -2.00
-2.00 -1.00
-2.00 1.00
-1.00 2.00

输出

复制
11.404918347