← All problemsSign in

Construct a String

CodeChefRating 3229Open on judge ↗

Consider a string $s$. The following operation can be performed on it successively several (possibly zero) times. - Select any non empty suffix of $s$ and append it to $s$ For example, if $s = \text{abcd}$, then $s$ can become either $\text{abcdd}$, $\text{abcdcd}$, $\text{abcdbcd}$ or $\text{abcdabcd}$ after one operation. Successive operations are now performed on the new string. You are giv

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