2 shunfurh shunfurh 于 2017.09.17 15:29 提问

Illumination

Description

You are given N light sources on the plane, each of which illuminates the angle of 2π/N with the vertex in the source point (including its sides).

You must choose the direction of the illuminated angle for each of these sources, so that the whole plane is illuminated. It can be proved that this is always possible.
A light source itself casts no shadow and does not interfere with light beams from the other sources.
Input

The first line of the input file contains N -- the number of light sources (3 <= N <= 30). Next N lines contain two integer numbers each -- the coordinates of the light sources. All coordinates do not exceed 100 by their absolute value. No two sources coincide.
Output

Print N real numbers - for each light source specify an angle that the bisector of the illuminated angle makes with OX axis, counterclockwise. Print at least six digits after the decimal point. No angle must exceed 100π by its absolute value.

Sample Input

3
0 0
2 0
1 1
Sample Output

0.52359877559829887
2.61799387799149437
4.71238898038468986

1个回答

caozhy
caozhy   Ds   Rxr 2017.10.01 04:18
已采纳
Csdn user default icon
上传中...
上传图片
插入图片