2816. Viva Confetti

单点时限: 2.0 sec

内存限制: 256 MB

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.

输入格式

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 ), followed by one Ine descriptions of each disc: coordinates of its center and radius, expressed as real numbers in decimal notation, with up to digits after the decimal point. The imprecision margin is . That is, it is guaranteed that variations of less than on input values do not change which discs are visible. Coordinates of all points contained in discs are
between and .

Confetti are listed in their stacking order, being the bottom one and the top one.

You are observing from the top.

The end of the input is marked by a zero on a single line.

输出格式

For each configuration you should output the number of visible confetti on a single line.

样例

Input
3
0 0 0.5
-0.9 0 1.00000000001
0.9 0 1.00000000001
5
0 1 0.5
1 1 1.00000000001
0 2 1.00000000001
-1 1 1.00000000001
0 -0.00001 1.00000000001
5
0 1 0.5
1 1 1.00000000001
0 2 1.00000000001
-1 1 1.00000000001
0 0 1.00000000001
2
0 0 1.0000001
0 0 1
2
0 0 1
0.00000001 0 1
0
Output
3
5
4
2
2

1 人解决,1 人已尝试。

1 份提交通过,共有 1 份提交。

8.9 EMB 奖励。

创建: 2 年,10 月前.

修改: 2 年,3 月前.

最后提交: 2 周,1 天前.

来源: Japan

题目标签