To minimize the costs of the bridges, a necessity to get the plan approved, Clouseau has been working hard to find the best places to build the bridges that connect the islands to France. He has figured out that connecting each island to France individually is not the cheapest solution; it is cheaper to construct a bridge between one island and France, and build additional bridges to connect the other islands indirectly. Clouseau, however, is unable to find the best places to build the bridges because of the irregular shapes of the islands.
By approximating the islands as circles, Clouseau was able to report his boss, Mr. Dreyfus, an estimate of the length of the interconnecting bridges. Mr. Dreyfus, however, is not satisfied and demands that Clouseau report by Monday the exact length of the bridges needed based on the actual shapes of the Channel Islands. If Clouseau does not report on time he will be fired. Would you be so kind to help out Clouseau and write a program that computes the minimum length of the bridges needed to interconnect the Channel Islands?
Where N is the number of bridges, and L is the total length, which should be printed as a floating point number with an accuracy of three digits.The minimal interconnect consists of N bridges with a total length of L
1 3 4 0 0 0 1 1 1 1 0 4 2 0 2 1 3 1 3 0 3 4 0 5 0 5 1
The minimal interconnect consists of 2 bridges with a total length of 2.000