#P2510. [HAOI2008] 下落的圆盘

    ID: 3327 远端评测题 1000ms 125MiB 尝试: 0 已通过: 0 显示难度省选/NOI− 上传者: 标签>贪心2008河南各省省选

[HAOI2008] 下落的圆盘

Problem Description

There are n disks falling from the sky, and those that fall later can cover those that fell earlier. Find the perimeter of the final closed region formed. See the figure below; the total length of all the red curves is the required answer.

Input Format

The first line contains an integer n.

Each of the next n lines contains three real numbers r_i, x_i, y_i, representing the radius and the center coordinates of the i-th disk.

Output Format

Output the final perimeter, to three decimal places.

2
1 0 0
1 1 0
10.472

Hint

Constraints

1 ≤ n ≤ 1000.

Translated by ChatGPT 5