{"problem":{"name":"091. Spacelab","description":{"content":"Spacelab With the CodeRams club, you've created a lab in space to study solar power. You created your lab on a planet in our solar system. Unfortunately, a rival CodeQuest team also created a spacela","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10269091"},"statements":[{"statement_type":"Markdown","content":"Spacelab\n\nWith the CodeRams club, you've created a lab in space to study solar power. You created your lab on a planet in our solar system. Unfortunately, a rival CodeQuest team also created a spacelab on a different planet. You need to figure out which spacelab is closer to the sun. \n\nFor reference, the order of the planets in our solar system from closest to farthest away from the sun is \"Mercury\", \"Venus\", \"Earth\", \"Mars\", \"Jupiter\", \"Saturn\", \"Uranus\", \"Neptune\" (you can copy this into a list/array if you want).\n\nThe first line of input contains a single string, representing the planet that your spacelab is located on. The second line of input contains a single string, representing the planet that the rival team's spacelab is located on. The planets given are guaranteed to be in our solar system, and no TNOs, dwarf planets, or asteroids will be given in the input.\n\nIf your spacelab is closer to the sun than your rival's, output \"CLOSER\" (no quotes)\n\nIf your spacelab is farther away from the sun than your rival's, output \"FARTHER AWAY\" (no quotes)\n\nIf your spacelab is on the same planet as your rival's, output \"THE SAME\" (no quotes)\n\n## Input\n\nThe first line of input contains a single string, representing the planet that your spacelab is located on. The second line of input contains a single string, representing the planet that the rival team's spacelab is located on. The planets given are guaranteed to be in our solar system, and no TNOs, dwarf planets, or asteroids will be given in the input.\n\n## Output\n\nIf your spacelab is closer to the sun than your rival's, output \"CLOSER\" (no quotes)If your spacelab is farther away from the sun than your rival's, output \"FARTHER AWAY\" (no quotes)If your spacelab is on the same planet as your rival's, output \"THE SAME\" (no quotes)\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ P = [\"\\text{Mercury}\", \"\\text{Venus}\", \"\\text{Earth}\", \"\\text{Mars}\", \"\\text{Jupiter}\", \"\\text{Saturn}\", \"\\text{Uranus}\", \"\\text{Neptune}\"] $ be the ordered list of planets by distance from the sun.  \nLet $ d: P \\to \\{1, 2, \\dots, 8\\} $ be the distance function such that $ d(p) = i $ if $ p = P[i-1] $.  \nLet $ p_1 \\in P $ be the planet of your spacelab.  \nLet $ p_2 \\in P $ be the planet of the rival’s spacelab.\n\n**Constraints**  \n$ p_1, p_2 \\in P $\n\n**Objective**  \nCompare $ d(p_1) $ and $ d(p_2) $:  \n- If $ d(p_1) < d(p_2) $, output \"CLOSER\"  \n- If $ d(p_1) > d(p_2) $, output \"FARTHER AWAY\"  \n- If $ d(p_1) = d(p_2) $, output \"THE SAME\"","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10269091","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}