Alec Game
CodeChefOpen on judge ↗
Alec is playing a game with his 3 years old sister. His sister has recently learned lower case English alphabets. She writes the word $X$ in her copy at the same time Alec also writes the word $Y$ in his copy. After that they match the words if the word $Y$ is a subsequence of word $X$ then Alec wins, else he loses. You are given the number of matches they played N, and both the words $X$ and $Y$
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