当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。
There are N points marked on a surface, pair (xi, yi) is coordinates of a point number i. Let’s call a necklace a set of N figures which fulfills the following rules.
Write a program which takes points and constructs a necklace.
The first line of the input contains one integer number N (2 ≤ N ≤ 100). Each of the next N lines contains two real numbers xi, yi (1 000 ≤ xi, yi ≤ 1 000), separated by one space. It is guaranteed that at least one necklace exists.
The output has to contain N lines. A line #i contains real number ri, (0 ≤ ri < 10 000). To avoid potential accuracy problems, a checking program uses the following rules.
4 0 0 10 0 10 10 0 10
7 7 7 7
时间上限 | 内存上限 |
1000 | 65536 |