← All problemsSign in

One Down

CodeChefRating 1119Open on judge ↗

You are given two binary strings $S$ and $T$, each of length $N$. You wish to convert $S$ into $T$ using the following operation any number of times (possibly zero): - Choose two distinct indices $i$ and $j$ ($1 ≤ i, j ≤ N$, $i ≠ j$) such that both $S_i = 1$ and $S_j = 1$, and change both to $S_i = 0$ and $S_j = 0$. Determine whether it is possible to transform $S$ into $T$ by applying the above

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