{"problem":{"name":"I. Moon","description":{"content":"Let $S$ be a sphere with radius $1$ and center $(0, 0, 0)$. Let $a_0, a_1, \\\\dots, a_n$ be $n + 1$ points on the surface of $S$. The positions of $a_1, \\\\dots, a_n$ are fixed while the position of $a_","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10247I"},"statements":[{"statement_type":"Markdown","content":"Let $S$ be a sphere with radius $1$ and center $(0, 0, 0)$. Let $a_0, a_1, \\\\dots, a_n$ be $n + 1$ points on the surface of $S$. The positions of $a_1, \\\\dots, 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, \\\\dots, a_n$(possibly on the border) and $0$ otherwise. Calculate the expected value of $f$.\n\nThe first line contains an integer $n$ denoting the number of points ($0 <= n <= 100000$).\n\nThe $i$-th line of the next $n$ lines contains three integers $x, y, z$ denoting the point $a_i = (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)))$ ($-1000000 <= x, y, z <= 1000000, x^2 + y^2 + z^2 eq.not 0$).\n\nIt is guaranteed that $a_1, \\\\dots, a_n$ are distinct.\n\nOutput the answer.\n\nThe answer will be considered correct if its absolute or relative error doesn't exceed $10^(-6)$.\n\n## Input\n\nThe first line contains an integer $n$ denoting the number of points ($0 <= n <= 100000$).The $i$-th line of the next $n$ lines contains three integers $x, y, z$ denoting the point $a_i = (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)))$ ($-1000000 <= x, y, z <= 1000000, x^2 + y^2 + z^2 eq.not 0$).It is guaranteed that $a_1, \\\\dots, a_n$ are distinct.\n\n## Output\n\nOutput the answer.The answer will be considered correct if its absolute or relative error doesn't exceed $10^(-6)$.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ S = \\{ \\mathbf{x} \\in \\mathbb{R}^3 : \\|\\mathbf{x}\\| = 1 \\} $ be the unit sphere centered at the origin.  \nLet $ \\mathbf{a}_1, \\dots, \\mathbf{a}_n \\in S $ be fixed distinct points on $ S $.  \nLet $ \\mathbf{a}_0 $ be a random point uniformly distributed on $ S $.  \n\nDefine the indicator function:  \n$$\nf = \\begin{cases}\n1 & \\text{if } \\exists \\text{ a closed hemisphere } H \\subseteq \\mathbb{R}^3 \\text{ such that } \\{\\mathbf{a}_0, \\dots, \\mathbf{a}_n\\} \\subseteq H, \\\\\n0 & \\text{otherwise}.\n\\end{cases}\n$$\n\n**Constraints**  \n1. $ n \\in \\mathbb{Z} $, $ 0 \\leq n \\leq 100000 $  \n2. For each $ i \\in \\{1, \\dots, n\\} $, $ \\mathbf{a}_i = \\frac{(x_i, y_i, z_i)}{\\| (x_i, y_i, z_i) \\|} $ for integers $ x_i, y_i, z_i \\in [-10^6, 10^6] $, with $ x_i^2 + y_i^2 + z_i^2 \\neq 0 $.  \n3. All $ \\mathbf{a}_1, \\dots, \\mathbf{a}_n $ are distinct.\n\n**Objective**  \nCompute $ \\mathbb{E}[f] $, the probability that $ \\mathbf{a}_0, \\mathbf{a}_1, \\dots, \\mathbf{a}_n $ lie together in some closed hemisphere.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10247I","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}