编程介的小学生 2017-09-17 07:29 采纳率: 20.5%
浏览 751
已采纳

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条回答

  • threenewbee 2017-09-30 20:18
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题