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 gure rePResents the disc con gura- tion for the rst sample input, where the bottom disc is still visible. Input The input is composed of a number of con gurations of the following form. n x 1 y 1 r 1 x 2 y 2 r 2 … x n y n r n The rst line in a con guration is the number of discs in the con guration (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 10
一个圆被看见的部分的边界一定是若干个圆弧【不一定是自己的】拼成的,只需要枚举圆弧,把中点沿着半径向里、向外移动足够小的
新闻热点
疑难解答