Help Player 456
CodeChefOpen on judge ↗
Player 456 has recently learned about string compression. Fascinated by it he wants to execute his own string compression algorithm. He is not a good programmer and wants you to help him. Help Player 456 to do basic string compression. For a character which is consecutively repeated more than once, replace consecutive duplicate occurrences with the count of repetitions. ### Input -The first line
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