#P6711. [BalticOI 2005] Polygon (Day2)
[BalticOI 2005] Polygon (Day2)
Description
Given the length of each edge of a convex hull, construct this convex hull.
Input Format
The first line contains an integer , representing the number of points.
The next lines each contain an integer , representing the length of one edge. Here, is the length of the edge between the -th point and the -th point, and is the length of the edge between the -th point and the -st point.
Output Format
Output lines. Each line contains two real numbers , representing the coordinates of a point. (They must satisfy .)
If there are multiple solutions, output any one of them.
If there is no solution, output NO SOLUTION.
Requirements for judging on Luogu
Note: please output the points on the convex hull in counterclockwise order.
Although the original statement allows either clockwise or counterclockwise order, in this problem you must output strictly in counterclockwise order.
You do not have to output in the original numbering order. For example, if is counterclockwise, then is also acceptable.
4
7
4
5
4
0.5 2.5
7.5 2.5
4.5 6.5
0.5 6.5
Hint
Sample Explanation
For sample :

Constraints
For of the testdata, , .
This problem uses Special Judge.
Thanks to the spj author
Notes
Translated from BalticOI 2005 Day2 C Polygon.
Translated by ChatGPT 5
京公网安备 11011102002149号