← All problemsSign in

Huh, Easy

CodeChefRating 1820Open on judge ↗

Chef wants to construct two special strings $S$ and $T$ of length $N$ using only characters $A$, $B$, and $C$ for a coding challenge. Both strings must satisfy: - No two adjacent characters are the same. - Their Longest Common Subsequence is exactly $K$. Chef needs your help to determine if it's possible to construct such strings $S$ and $T$. If it's possible, output the strings; otherwise, outpu

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