配点: 800 点
問題文
在二维平面上满足以下条件。 N 点 放置 P_1 , P_2 , \ldots , P_N 。在这种条件下, 求N 角形 P_1 P_2 \dots P_N 的最大面积。然而,原点和点 连接 P_i 的直线 x 与轴正方向的夹角为 \theta_i\ \mathrm{rad} 。 除以
- i 第一点 P_i 是以原点为中心的半径
存在于 R_i 的圆周上
- 给出 R 是\displaystyle R_1 = R_N 和 保证满足 \displaystyle R_1, R_N \leq R_i (1 \leq i \leq N) 保证会见面
- \displaystyle \frac{\pi}{2N} \leq \theta_{i+1} -\theta_{i} (1 \leq i \leq N-1) (14:07 修正)
- \displaystyle \theta_1 = 0 , \displaystyle \theta_N = \frac{2\pi}{3}
\displaystyle x\ \mathrm{rad} 的定义
半径是 弧长为 1 弧长为 x 扇形的圆心角为 将其定义为 \displaystyle x\ \mathrm{rad} 。 等于 \displaystyle x\ \mathrm{rad} 是 \displaystyle \frac{180}{\pi} x 度的角度。制約
- 所有输入均以整数形式给出
- 3 \leq N \leq 100{,}000
- 0< R_i \leq 1{,}000 (1 \leq i \leq N)
- R_1=R_N 和 保证满足 R_1, R_N \leq R_i (1 \leq i \leq N)
入力
输入是按以下格式从标准输入给出的。
N R_1 R_2 \ldots R_N
出力
请打印答案。请注意,真实解的绝对误差或相对误差为 10^{−6} 如果答案如下,保证被视为正确。
入力例 1
3 1 1 1
出力例 1
0.433012701892219
3 点 放置 P_1 , P_2 , P_3 ( (1,0) , (\frac{1}{2},\frac{\sqrt{3}}{2}) , (-\frac{1}{2},\frac{\sqrt{3}}{2}) ) 给出一个三角形 P_1P_2P_3 的面积是 \frac{\sqrt{3}}{4} ,这是约束内的最大值。 如果
入力例 2
7 1 2 1 3 1 2 1
出力例 2
2.147031208123904
7 点 放置 P_1 , P_2 , \ldots , P_7 设置正确,它将是一个七边形。 P_1P_2\dots P_7 的面积约为 对于 2.147031208123904 ,这是约束内的最大值。 如果