← All problemsSign in

Make same

CodeChefRating 1492Open on judge ↗

You are given three binary strings$^\dagger$ $S_{1}, S_{2}, S_{3}$ each of length $N$. Your goal is to make each string contain identical characters (all $0's$ or all $1's$). To achieve this, you can perform the following operation: - Choose $x, y$ from $\{1, 2, 3\}$. - Choose index $i, j$ such that $0 \leq i, j \lt N$. - Swap $S_{xi}$ and $S_{yj}$ (character at $i^{th}$ index in $S_{x}$ and cha

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