← All problemsSign in

Is it uniquely decodable

CodeChefRating 2217Open on judge ↗

Bob wanted to tell his son the password of his CodeChef account, but as there are many people present in the surroundings, Bob encodes the password. Bob’s original password consists of digits $1, 2,$ and $3$ only. To encode the password, Bob decided: - Instead of the digit $1$, he would say $\texttt{ab}$. - Instead of the digit $2$, he would say $\texttt{aba}$. - Instead of the digit $3$, he wou

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