Opposite Attract
You are given a binary string $S$ of length $N$. Your task is to generate a new binary string $T$ of the same length such that each corresponding character of $T$ is different from the character at the same position in $S$. In other words, for each position $i$ ($0 ≤ i < N$), the following condition must hold $T_i ≠ S_i$. ### Input - The first line of input will contain a single integer $T$, den
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.
Sign in to chat with the tutor and save your progress.
Sign in to start