#P15104. [ICPC 2025 LAC] Just Look Up
[ICPC 2025 LAC] Just Look Up
题目描述
The year is 2432, and after millennia of looking at the sky, astronomers have found all the stars. This arduous journey, which started with the discovery of the Sun in 450 BC, has finally come to an end. Since scientists can never be content, they have turned to the next best thing, and decided to find planets instead.
A passionate group, the Planet Discovery Aficionados (PDA), has already started working on it! To find new planets, they have built the Large Astronomical Telescope of Amazing Might (LATAM) – a telescope that is extremely sensitive to light and thus can see even the tiniest planets.
When pointed to the sky, LATAM’s field of view encompasses the portion of space enclosed strictly by a circular cone, with the vertex located at the Earth and extending infinitely away from it. The angle of the cone corresponding to the viewing area of LATAM can be adjusted by the members of PDA, and it ranges from when the cone collapses to a line, to when it encompasses a full half-space.
Sadly, because LATAM is so sensitive to light, if there are any stars in its field of view the picture will be a bright spot, and PDA won’t be able to see any planets. They ask for your help to determine the largest possible viewing angle that does not include any stars. PDA has enough money to travel anywhere on Earth, so you are allowed to point LATAM in any direction in the sky.
Because the universe is sufficiently large, PDA considers that all the stars and the Earth are fixed 3D points, with the Earth located at . The group will give you the coordinates of all the stars in the universe. They hope that with this information, you will be able to complete your task.
输入格式
The first line contains an integer () indicating the number of stars in the universe.
Each of the next lines describes a star with three integers , and (), representing that the star is located at . No two stars share the same location, and no star is located at .
输出格式
Output a single line with the largest possible angle the telescope can be set to without observing any stars. If there exists a direction where a full half-space contains no stars, report . The output must have an absolute or relative error of at most .
6
1 0 0
-1 0 0
0 1 0
0 -1 0
0 0 1
0 0 -1
54.7356103172
2
314 314 314
1 1 1
90