#6143. [EC Final 2019] Moon

    ID: 6143 传统题 2000ms 256MiB 尝试: 0 已通过: 0 难度: (无) 上传者: 标签>P13946计算几何2019Special Judge三维计算几何ICPCEC Final

[EC Final 2019] Moon

[EC Final 2019] Moon

题目描述

Let $S$ be a sphere with radius $1$ and center $(0, 0, 0)$. Let $a_0,a_1,\ldots,a_n$ be $n+1$ points on the surface of $S$. The positions of $a_1,\ldots,a_n$ are fixed while the position of $a_0$ is a uniform random point on the surface of $S$. Let $f$ be $1$ if there exists a hemisphere of $S$ that contains $a_0,\ldots,a_n$ and $0$ otherwise. Calculate the expected value of $f$.

输入格式

The first line contains an integer $n$ denoting the number of points ($0\le n\le 100000$).

The ii-th line of the next nn lines contains three integers x,y,zx, y, z denoting the point $a_i=\left(\frac{x}{\sqrt{x^2+y^2+z^2}}, \frac{y}{\sqrt{x^2+y^2+z^2}}, \frac{z}{\sqrt{x^2+y^2+z^2}}\right)$ (−1000000≤x,y,z≤1000000,x2+y2+z2≠0-1000000\le x, y, z\le 1000000, x^2+y^2+z^2\neq 0).

It is guaranteed that a1,…,ana_1,\ldots,a_n are distinct.

输出格式

Output the answer.

The answer will be considered correct if its absolute or relative error doesn't exceed 10−610 ^{-6}.

3
1 0 0
0 1 0
0 0 1
0.875000000000

提示

(暂无提示) 标签: P13946|计算几何|2019|Special Judge|三维计算几何|ICPC|EC Final

来源

P13946|[EC Final 2019] Moon