By XIII Maratona de Programação IME-USP, 2009 Brazil
We are in 2048. There are a lot of floating platforms orbiting Earth that defends our planet against asteroids and any other thing that might hit our planet. These platforms are equipped with cannons that shot projectiles on anything getting close.
An alien civilization intends to invade our planet, but first they need to get trough the barrier of floating platforms. To do so, they are going to use a laser super multi-cannon, that shoots, at the same time, thousands of laser beams, from a single point. This way they are able to aim in all platforms of our planet and destroy all of them at the same time, without giving us any time of reaction.
The biggest problem is that the laser beams are so powerful that they don't stop after destroying the floating platforms, they end up hitting earth after that. When the ray hits the solo, each laser beam turns into an energy sphere, and each energy sphere attach to another energy sphere through wires, also energized, forming a power grid that cannot be touched. It is a highly dangerous and destructive attack.
Our intergalactic spy Austero Poderes made into the cannon e figured out from where the aliens want do release those rays. Since he can't simply deactivate the cannons, the spy headquarters decided that, as its not possible to save the platforms, we have to estimate the damage that Earth's soil will receive by the laser beams.
Knowing where the platforms are and from where the laser beams will be shot, you have to define what will be the area compromised by the "energy network" that will be formed on Earth.
Remember that on 2033 it was discovered that the Earth is actually flat.
The input file will contain several instances.
Each instance begins with an integer N (3 ≤ N ≤ 1000), which represents the number of floating platforms. The next line contain coordinates (Xp, Yp, Zp), representing from where the laser beams will be shot. The N following lines contain, each one, coordinates (Xi, Yi, Zi), representing where are the floating platforms. Earth's soil is represented by XY plane. The laser beams' shooting point will always be above the platforms. The platforms will be in different points and no laser hits the ground on a coordinate (x or y) smaller than -100000 or bigger than 100000 (-100000 ≤ Xp,Yp,Zp,Xi,Yi,Zi ≤ 100000).The input stops when N = 0.
For each instance on the input, print one line containing the value of the compromised area by the energetic network formed by the laser beams on Earth's soil, with two decimal places.
The output must be printed on the standard output.
|Sample Input||Sample Output|