{"problem":{"name":"094. Computer Love","description":{"content":"Computer Love You love your computer, and you want to give it a present: a large integer. However, your computer especially loves powers of two. Given two numbers $x$ and $y$, find the largest power ","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10269094"},"statements":[{"statement_type":"Markdown","content":"Computer Love\n\nYou love your computer, and you want to give it a present: a large integer. However, your computer especially loves powers of two. Given two numbers $x$ and $y$, find the largest power of two between $x$ and $y$, i.e. find the largest number $n$ such that $x$ <= $n$ <= $y$, and $n$ is a power of two.\n\nThe only line of input contains two space-separated integers $x$ and $y$: the lower and upper bounds of the range described in the problems statement. The values are inclusive, i.e. $x$ and $y$ could potentially be valid answers if they were powers of two.\n\nOutput a single integer $n$: the largest power of two such that $x$ <= $n$ <= $y$. If there aren't any powers of two between $x$ and $y$, output $-1$. The answer is guaranteed to be within the bounds of 32-bit signed integers.\n\n## Input\n\nThe only line of input contains two space-separated integers $x$ and $y$: the lower and upper bounds of the range described in the problems statement. The values are inclusive, i.e. $x$ and $y$ could potentially be valid answers if they were powers of two.\n\n## Output\n\nOutput a single integer $n$: the largest power of two such that $x$ <= $n$ <= $y$. If there aren't any powers of two between $x$ and $y$, output $-1$. The answer is guaranteed to be within the bounds of 32-bit signed integers.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ x, y \\in \\mathbb{Z} $ be the inclusive lower and upper bounds of the range.  \nLet $ P = \\{ 2^k \\mid k \\in \\mathbb{Z},\\, 2^k \\geq 0 \\} $ be the set of non-negative powers of two.\n\n**Constraints**  \n$ x \\leq y $, and $ x, y $ are within the bounds of 32-bit signed integers.\n\n**Objective**  \nFind the largest $ n \\in P $ such that $ x \\leq n \\leq y $.  \nIf no such $ n $ exists, output $ -1 $.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10269094","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}