Radio Waves zoj 3370
来源:互联网 发布:淘宝亚马逊代拍 编辑:程序博客网 时间:2024/05/16 07:38
Time Limit: 10 Seconds Memory Limit: 32768 KB Special Judge
It is well known, that radio waves interfere, so if two closely located radio transmitters use the same frequency, the quality of the programs is poor.
The company NateRadio is planning to transmit its programs in Flatland. The Ministry of Health and Communications has issued the license to the company that allows it to use two different frequencies for the transmission.
The company has n slots for radio transmitters located at different points of the country. However, the transmitters themselves are not yet bought. The managers of the company want to know what power the transmitters should be. The power of the transmitter affects the range it transmits the radio program to.
All transmitters will have the same power. Transmitters will be installed into the slots and each will be tuned to one of the two allowed frequencies. The power of the transmitters must be selected in such a way that the programs from no two transmitters tuned to the same frequency are simultaneously received at any point. Each slot must be used.
Since the company wants the programs to be received by most people, it wants to install as powerful transmitters as possible --- the range of the transmission must be maximal.
Input
The first line of the input file contains n --- the number of slots for the transmitters (3 ≤ n ≤ 1200). The following n lines contain two integer numbers each --- the coordinates of the corresponding slots. Coordinates do not exceed 104 by their absolute value. All slots are different.
There are multiple cases. Process to the end of file.
Output
On the first line of the output file print the maximal possible range of the transmitters. On the second line print n integer numbers --- for each transmitter slot print 1 if the transmitter in this slot must use the first frequency, or 2 if it must use the second one.
You answer must be accurate up to 10-6. All inaccurances under this level will be resolved in your favor.
Sample Input
40 00 11 01 1
Sample Output
0.707106781186547521 2 2 1
Author: Andrew Stankevich
Source: Andrew Stankevich's Contest #11
- Radio Waves zoj 3370
- ZOJ3370 Radio Waves,二分检索
- Triangle waves
- Waves Render WIP2
- Realistic looking bow waves
- Waves区块链社区
- radio
- radio
- radio
- radio
- radio
- radio
- FFT水面加入Choppy Waves
- Simple Breaking Waves in Houdini
- Simple Breaking Waves in Maya
- Simple Breaking Waves in Maya
- Simple Breaking Waves in Maya
- 关于waves公司的X-noise
- WinPswLogger记录系统登录用户名和密码
- 文件系统数据的一致性
- 强烈推荐:给去美国的新生说几句(转载),超实用
- 在linux上访问windows共享目录
- 删除MFC自建的单文档工程的菜单和工具栏
- Radio Waves zoj 3370
- Linux查找文件内容的常用命令方法
- Oracle rowid和rownum
- pku 1442 Black Box(优先队列)
- access
- windows dfs 与旧脱机文件冲突造成重定向失败
- mysql编码转换设置修改
- 100条励志的好句
- tomcat启动的时候报 validateJarFile jar not loaded