← All problemsSign in

Substring and five rules

CodeChefRating 3534Open on judge ↗

Given a string S. You need to find a substring which satisfies the following conditions and output its start and end positions in the string S. - Has exactly x different characters in it. - Length of substring is atleast minLength and atmost maxLength. - substring's start position is greater than or equal to L. - substring's end position is less than or equal to R. If there are multiple subst

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