QOJ.ac

QOJ

时间限制: 2 s 内存限制: 256 MB 总分: 100

#8183. 圆的并

统计

如果平面上存在一个点,使得该点位于每一个圆的内部或边界上,则称这几个圆的排列是“有趣的”。一个排列的覆盖区域由所有位于至少一个圆内部或边界上的点组成。

考虑 $n$ 个半径分别为 $r_1, \dots, r_n$ 的圆。求在所有有趣的排列中,这些圆所覆盖区域的最大可能面积。

输入格式

第一行包含一个整数 $n$ ($1 \le n \le 10^4$)。 第二行包含 $n$ 个整数 $r_1, \dots, r_n$ ($1 \le r_i \le 10^3$)。

输出格式

输出一个实数,表示最大可能的覆盖面积。如果你的答案与标准答案的绝对误差或相对误差不超过 $10^{-6}$,则视为正确。

样例

输入 1

3
10 9 8

输出 1

726.4578311468

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.