← All problemsSign in

Odd Even Binary String

CodeChefRating 1099Open on judge ↗

Chef had an array $A$ of length $N$ such that $1 \le A_i \le N$ for all $1 \le i \le N$. Chef constructed another **binary** array $B$ of length $N$ in the following manner: - $B_i = 1$ if the frequency of element $i$ in $A$ is *odd*. - $B_i = 0$ if the frequency of element $i$ in $A$ is *even*. Such an array $B$ is called the *parity encoding* array of $A$. For example, if $A = [1, 1, 2, 3]$, t

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