← All problemsSign in

Reduce string

CodeChefRating 2297Open on judge ↗

Give a string s of length l, and a set S of n sample string(s). We do reduce the string s using the set S by this way: - Wherever Si appears as a consecutive substring of the string s, you can delete (or not) it. - After each deletion, you will get a new string s by joining the part to the left and to the right of the deleted substring. Request By that way, try to reduce the given string s to

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