HOMOGENEOUS STRINGS
CodeChefOpen on judge ↗
Chef is really obsessed with strings. He does several experiments on them. On a certain day Chef tries to find something groundbreaking. He wants to check if it is possible to convert a given string $S$ of length $N$ to a string that is the repetition of its substring of $K$ characters. To convert Chef can replace one substring of length $K$ with $K$ characters. ### Input - First line will contai
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