QOJ.ac

QOJ

Límite de tiempo: 1 s Límite de memoria: 128 MB Puntuación total: 150

#16168. Optimal Packing

Estadísticas

Faqiang Company produces a metal product made of straight metal bars, which are welded together at their intersection points. For aesthetic reasons, the product needs to be wrapped in a special material. To save costs, the company wants to minimize the amount of material used (ignoring any waste from cutting).

Write a program that takes the number of vertices of the product and the coordinates of all vertices as input, and calculates the minimum surface area of the material required to wrap the product. The result should be rounded to six decimal places.

Input

The input consists of several lines: the first line contains an integer $n$ ($4 \le n \le 100$), representing the number of vertices. The next $n$ lines each contain three real numbers $x_i, y_i, z_i$, representing the coordinates of the $i$-th vertex. All vertex positions are distinct.

Output

The output contains a single real number, representing the minimum surface area of the material required to wrap the product.

Examples

Input 1

4
0 0 0
1 0 0
0 1 0
0 0 1

Output 1

2.366025

Note

The input example contains 4 points.

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.