Viva Confetti(几何+圆盘覆盖问题)
来源:互联网 发布:js截取字符串中的汉字 编辑:程序博客网 时间:2024/05/01 19:43
Description
Do you know confetti? They are small discs of colored paper, and people throw them around during parties or festivals. Since people throw lots of confetti, they may end up stacked one on another, so there may be hidden ones underneath.
A handful of various sized confetti have been dropped on a table. Given their positions and sizes, can you tell us how many of them you can see?
The following figure represents the disc configuration for the first sample input, where the bottom disc is still visible.
Input
The input is composed of a number of configurations of the following form.
The first line in a configuration is the number of discs in the configuration (a positive integer not more than 100), followed by one Ine descriptions of each disc: coordinates of its center and radius, expressed as real numbers in decimal notation, with up to 12 digits after the decimal point. The imprecision margin is 5 x 10-13 . That is, it is guaranteed that variations of less than 5 x 10-13 on input values do not change which discs are visible. Coordinates of all points contained in discs are between -10 and 10.
Confetti are listed in their stacking order, x1y1r1 being the bottom one and xnynrn the top one. You are observing from the top.
The end of the input is marked by a zero on a single line.
Output
For each configuration you should output the number of visible confetti on a single line.
Sample Input
30 0 0.5-0.9 0 1.000000000010.9 0 1.0000000000150 1 0.51 1 1.000000000010 2 1.00000000001-1 1 1.000000000010 -0.00001 1.0000000000150 1 0.51 1 1.000000000010 2 1.00000000001-1 1 1.000000000010 0 1.0000000000120 0 1.00000010 0 120 0 10.00000001 0 10
Sample Output
3542
题意:已知n个圆盘,依次放到桌面的上。现按照放置的顺序,一次给出各个圆盘的圆心位置和半径,问最后有多少圆盘可见?
【分析】:还没想好~~~~~~~容我思考一晚。
- Viva Confetti(几何+圆盘覆盖问题)
- uva 1308 - Viva Confetti(几何)
- LA2572 Viva Confetti 计算几何
- 圆盘覆盖,计算几何(圆盘问题,LA 2572)
- ZOJ 1696 Viva Confetti 计算几何
- LA 2572 Viva Confetti Kanazawa - 2002/2003 平面上的圆盘
- LA - 2572 - Viva Confetti
- zoj 1696 Viva Confetti
- LA 2572 - Viva Confetti
- zoj 1696 Viva Confetti
- zoj 1696 Viva Confetti
- POJ 1418 Viva Confetti
- POJ 1418 Viva Confetti
- uva1308 Viva Confetti
- poj 1418 || zoj 1696 Viva Confetti
- POJ 1418 Viva Confetti(Japan 2002 Kanazawa)
- POJ 1418 Viva Confetti 已翻译
- LA 2572 Viva Confetti 离散化 *
- [LeetCode]202.Happy Number
- 以四个在读写器作用范围内的电子标签为例说明二进制树型搜索算法选择电子标签的迭代过程
- Marriage Match II (hdu 3081 二分图+并查集)
- 记录一下今儿的java笔试题编程
- 【DP】ZOJ 3605 Find the Marble
- Viva Confetti(几何+圆盘覆盖问题)
- jQuery设置判断一组chechbox的checked属性
- 模拟一个简单的时钟
- Delegate
- 1~100之间 7的倍数的个数。并打印
- Service之“绑定”
- 纠删码与分布式系统
- Eigen中的变换矩阵
- Android学习 - 序列化