← All problemsSign in

Yet Another XOR Task

CodeChefRating 3466Open on judge ↗

You are given integers $N, M, K$ and $N$ integers $A_1, A_2, \ldots, A_N$. You can perform the following operation at most $K$ times: * Choose any integer $x$ such that $0 \le x < 2^M$. Then, for each $1 \le i \le N$, you can replace $A_i$ with $A_i \oplus x$, or leave it unchanged. What is the maximum value of $A_1 + A_2 + \ldots + A_N$ that you can achieve after this process? ### Input The f

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start