{"problem":{"name":"I. Absolute Game","description":{"content":"Alice and Bob are playing a game. Alice has an array $a$ of $n$ integers, Bob has an array $b$ of $n$ integers. In each turn, a player removes one element of his array. Players take turns alternately.","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10239I"},"statements":[{"statement_type":"Markdown","content":"Alice and Bob are playing a game. Alice has an array $a$ of $n$ integers, Bob has an array $b$ of $n$ integers. In each turn, a player removes one element of his array. Players take turns alternately. Alice goes first.\n\nThe game ends when both arrays contain exactly one element. Let $x$ be the last element in Alice's array and $y$ be the last element in Bob's array. Alice wants to maximize the absolute difference between $x$ and $y$ while Bob wants to minimize this value. Both players are playing optimally. \n\nFind what will be the final value of the game.\n\nThe first line contains a single integer $n$ ($1 <= n <= 1 thin 000$) — the number of values in each array.\n\nThe second line contains $n$ space-separated integers $a_1, a_2, \\\\dots, a_n$ ($1 <= a_i <= 10^9$) — the numbers in Alice's array.\n\nThe third line contains $n$ space-separated integers $b_1, b_2, \\\\dots, b_n$ ($1 <= b_i <= 10^9$) — the numbers in Bob's array.\n\nPrint the absolute difference between $x$ and $y$ if both players are playing optimally.\n\nIn the first example, the $x = 14$ and $y = 10$. Therefore, the difference between these two values is $4$. \n\nIn the second example, the size of the arrays is already $1$. Therefore, $x = 14$ and $y = 42$.\n\n## Input\n\nThe first line contains a single integer $n$ ($1 <= n <= 1 thin 000$) — the number of values in each array.The second line contains $n$ space-separated integers $a_1, a_2, \\\\dots, a_n$ ($1 <= a_i <= 10^9$) — the numbers in Alice's array.The third line contains $n$ space-separated integers $b_1, b_2, \\\\dots, b_n$ ($1 <= b_i <= 10^9$) — the numbers in Bob's array.\n\n## Output\n\nPrint the absolute difference between $x$ and $y$ if both players are playing optimally.\n\n[samples]\n\n## Note\n\nIn the first example, the $x = 14$ and $y = 10$. Therefore, the difference between these two values is $4$. In the second example, the size of the arrays is already $1$. Therefore, $x = 14$ and $y = 42$.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the number of questions.  \nLet $ s = s_1 s_2 \\dots s_n $ be a string of length $ n $, where each $ s_i \\in \\{a, b, c, d, e\\} $ represents Ayoub's answer to question $ i $.  \nLet $ c \\in \\{a, b, c, d, e\\} $ be the unknown correct answer letter for all questions (uniform across all questions).  \n\n**Constraints**  \n$ 1 \\leq n \\leq 1000 $  \n$ s_i \\in \\{a, b, c, d, e\\} $ for all $ i \\in \\{1, \\dots, n\\} $\n\n**Objective**  \nFor each possible $ c \\in \\{a, b, c, d, e\\} $, define the number of correct answers as:  \n$$\nf(c) = \\sum_{i=1}^{n} \\mathbf{1}_{s_i = c}\n$$  \nCompute:  \n- Minimum: $ \\min_{c \\in \\{a,b,c,d,e\\}} f(c) $  \n- Maximum: $ \\max_{c \\in \\{a,b,c,d,e\\}} f(c) $  \n\nOutput: $ \\left( \\min_{c} f(c),\\ \\max_{c} f(c) \\right) $","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10239I","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}