Smallest String
CodeChefOpen on judge ↗
Chef loves to cook delicious food, but before cooking food comes shopping for the ingredients for preparing food. So Chef went to the nearest supermarket for buying the lowest price ingredients. But, as every super-market wants to maximize their profit, so they sell items in bundles rather than individual packs. Our Chef is smart enough to understand this trick, and he wants to get the required
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