编程介的小学生 2017-08-27 13:06 采纳率: 20.5%
浏览 579
已采纳

Ribbon Gymnastics

Robert is a gymnastics coach. Unfortunately, he got four gymnastics beginners to attend the coming competition. Since the competition has a nice award, Robert will make all his effort to win the competition.

One performance requires that each of the four player should take a ribbon and rotate herself, and assume the ribbons will then straighten out. Since Robert's four players are beginners, Robert cannot control the actual rotating speeds of four players during the competition. And when two ribbons touch, they may wind, which will cause players felling down. For safety, Robert should avoid this. Four distinct points will be given as xi yi before the competition begins. Players should stand at those points when rotating.

The longer the ribbons are, the more bonus Robert will gain. After knowing the four points Robert can choose ribbons and points for each player. The length of each ribbon should be positive. So help Robert to find the maximal total lengths of the four ribbons.

Input

There will be multiple test cases.Please process to the end of input.

Each test case contains four lines.

Each line contains two integers xi (-10^8≤xi≤10^8) and yi (-10^8≤yi≤10^8).

Output

Output the total maximal sum of the lengths of the four ribbons. Answer having an absolute or relative error less than 1e-6 will be accepted.

Sample Input

0 0
0 3
4 0
4 3
Sample Output

6.00000000

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-09-10 15:53
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 matlab数字图像处理频率域滤波
  • ¥15 在abaqus做了二维正交切削模型,给刀具添加了超声振动条件后输出切削力为什么比普通切削增大这么多
  • ¥15 ELGamal和paillier计算效率谁快?
  • ¥15 file converter 转换格式失败 报错 Error marking filters as finished,如何解决?
  • ¥15 ubuntu系统下挂载磁盘上执行./提示权限不够
  • ¥15 Arcgis相交分析无法绘制一个或多个图形
  • ¥15 关于#r语言#的问题:差异分析前数据准备,报错Error in data[, sampleName1] : subscript out of bounds请问怎么解决呀以下是全部代码:
  • ¥15 seatunnel-web使用SQL组件时候后台报错,无法找到表格
  • ¥15 fpga自动售货机数码管(相关搜索:数字时钟)
  • ¥15 用前端向数据库插入数据,通过debug发现数据能走到后端,但是放行之后就会提示错误