{"problem":{"name":"Xor Minimization","description":{"content":"You are given a sequence of non-negative integers $A=(a_1,\\ldots,a_N)$. Let us perform the following operation on $A$ just once. *   Choose a non-negative integer $x$. Then, for every $i=1, \\ldots, N","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2500,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc281_f"},"statements":[{"statement_type":"Markdown","content":"You are given a sequence of non-negative integers $A=(a_1,\\ldots,a_N)$.\nLet us perform the following operation on $A$ just once.\n\n*   Choose a non-negative integer $x$. Then, for every $i=1, \\ldots, N$, replace the value of $a_i$ with the bitwise XOR of $a_i$ and $x$.\n\nLet $M$ be the maximum value in $A$ after the operation. Find the minimum possible value of $M$.\nWhat is bitwise XOR? The bitwise XOR of non-negative integers $A$ and $B$, $A \\oplus B$, is defined as follows.\n\n*   When $A \\oplus B$ is written in binary, the $k$\\-th lowest bit ($k \\geq 0$) is $1$ if exactly one of the $k$\\-th lowest bits of $A$ and $B$ is $1$, and $0$ otherwise.\n\nFor instance, $3 \\oplus 5 = 6$ (in binary: $011 \\oplus 101 = 110$).\n\n## Constraints\n\n*   $1 \\leq N \\leq 1.5 \\times 10^5$\n*   $0 \\leq a_i \\lt 2^{30}$\n*   All values in the input are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$\n$a_1$ $\\ldots$ $a_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc281_f","tags":[],"sample_group":[["3\n12 18 11","16\n\nIf we do the operation with $x=2$, the sequence becomes $(12 \\oplus 2,18 \\oplus 2, 11 \\oplus 2) = (14,16,9)$, where the maximum value $M$ is $16$.  \nWe cannot make $M$ smaller than $16$, so this value is the answer."],["10\n0 0 0 0 0 0 0 0 0 0","0"],["5\n324097321 555675086 304655177 991244276 9980291","805306368"]],"created_at":"2026-03-03 11:01:14"}}