P2287 [HNOI2004] Best Package
Description
Faqiang Company produces a kind of metal product made by connecting several straight metal bars, which are welded together at their intersection points. For aesthetic reasons, the product is to be wrapped with a layer of special material. To save costs, the company hopes to use the least amount of material (the waste from cutting scraps is ignored).
Write a program that, given the number of vertices of the product and the coordinates of all vertices, computes the minimal area of material needed to wrap the product. The result should be rounded to six decimal places.
Input Format
The input file consists of $(n+1)$ lines.
The first line contains an integer $n$ ($4 \leq n \leq 100$), denoting the number of vertices.
From line $2$ to line $(n+1)$, the $(i+1)$-th line contains three real numbers $x_i$, $y_i$, $z_i$, which are the coordinates of the $i$-th vertex.
All vertices are guaranteed to be distinct.
Output Format
Output a single real number, rounded to six decimal places, which is the minimal area of material required to wrap one such product.
Explanation/Hint
Translated by ChatGPT 5