{"raw_statement":[{"iden":"statement","content":"You're traveling through space in your spaceship, when your ship's radar detects several hostile aliens near the ship. You need to figure out how close each alien is to your ship.\n\nIn three dimensions, the distance between two points, each with an X, Y, and Z coordinate, is defined as follows:\n\nGiven the coordinates of your ship, in 3D space, figure out how far away each alien is from your ship, using the formula described above.\n\nThe first line of input contains three space-separated integers $X$, $Y$, and $Z$: the coordinates of your ship in 3D space. The next line of input contains a positive integer $n$ indicating the number of aliens that have been detected by the ship's radar. The next $n$ lines each contain three space-separated integers, each representing the coordinates of an alien.\n\nOutput $n$ lines. On each line, output a single decimal number: the distance between your ship and each alien, in the order given in the input. You don't need to round your answers.\n\n"},{"iden":"input","content":"The first line of input contains three space-separated integers $X$, $Y$, and $Z$: the coordinates of your ship in 3D space. The next line of input contains a positive integer $n$ indicating the number of aliens that have been detected by the ship's radar. The next $n$ lines each contain three space-separated integers, each representing the coordinates of an alien."},{"iden":"output","content":"Output $n$ lines. On each line, output a single decimal number: the distance between your ship and each alien, in the order given in the input. You don't need to round your answers."},{"iden":"examples","content":"Input7 3 8\n6\n2 1 5\n3 7 6\n4 2 1\n9 8 4\n7 3 8\n5 11 16\nOutput6.164414002968976\n6.0\n7.681145747868608\n6.708203932499369\n0.0\n11.489125293076057\nInput2 4 6\n3\n-2 -4 -6\n2 -4 -6\n-2 4 6\nOutput14.966629547095765\n14.422205101855956\n4.0\n"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ (X, Y, Z) \\in \\mathbb{R}^3 $ be the coordinates of the spaceship.  \nLet $ n \\in \\mathbb{Z}^+ $ be the number of aliens.  \nFor each $ i \\in \\{1, \\dots, n\\} $, let $ (x_i, y_i, z_i) \\in \\mathbb{R}^3 $ be the coordinates of the $ i $-th alien.\n\n**Constraints**  \n1. $ n \\geq 1 $  \n2. All coordinates are real numbers (given as integers, but treated as reals for distance calculation).\n\n**Objective**  \nFor each alien $ i $, compute the Euclidean distance $ d_i $ from the spaceship:  \n$$\nd_i = \\sqrt{(x_i - X)^2 + (y_i - Y)^2 + (z_i - Z)^2}\n$$  \nOutput $ d_1, d_2, \\dots, d_n $, one per line.","simple_statement":"Given your ship's 3D coordinates and n aliens' coordinates, calculate and print the straight-line distance from your ship to each alien.","has_page_source":false}