编程介的小学生 2017-10-17 11:02 采纳率: 20.5%
浏览 1477
已采纳

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-11-01 15:48
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型