
ZOJ Problem Set  3716
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 x_{i} y_{i} 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. InputThere will be multiple test cases.Please process to the end of input. Each test case contains four lines. Each line contains two integers x_{i} (10^8≤x_{i}≤10^8) and y_{i} (10^8≤y_{i}≤10^8). OutputOutput the total maximal sum of the lengths of the four ribbons. Answer having an absolute or relative error less than 1e6 will be accepted. Sample Input0 0 0 3 4 0 4 3 Sample Output6.00000000 Author: YANG, Jueji Contest: ZOJ Monthly, June 2013 