4 4 0 0 11 2 7 9 5
14 By rearranging $A$ as $(5, 0, 9, 7, 11, 4, 0, 2)$, we get $(A_1 \oplus A_2, A_3 \oplus A_4, A_5 \oplus A_6, A_7 \oplus A_8) = (5, 14, 15, 2)$, and the median of this sequence is $14$. It is impossible to rearrange $A$ so that the median of $(A_1 \oplus A_2, A_3 \oplus A_4, A_5 \oplus A_6, A_7 \oplus A_8)$ is $15$ or greater, so we print $14$.
1 998244353 1000000007
1755654
5 1 2 4 8 16 32 64 128 256 512
192
{
"problem": {
"name": "Max of Medians",
"description": {
"content": "You are given a sequence of length $2N$: $A = (A_1, A_2, \\ldots, A_{2N})$. Find the maximum value that can be obtained as the median of the length-$N$ sequence $(A_1 \\oplus A_2, A_3 \\oplus A_4, \\ldots",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 5000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc304_g"
},
"statements": [
{
"statement_type": "Markdown",
"content": "You are given a sequence of length $2N$: $A = (A_1, A_2, \\ldots, A_{2N})$.\nFind the maximum value that can be obtained as the median of the length-$N$ sequence $(A_1 \\oplus A_2, A_3 \\oplus A_4, \\ldots...",
"is_translate": false,
"language": "English"
}
]
}