编程介的小学生 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
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?