Count the number of Perfect strings
CodeChefOpen on judge ↗
A string is called a perfect string if it follows the following predefined rules. - A string should contain only one word. - The characters of a string are of lower case. - The length of the string is N. - The string contains exactly K different characters from the 26 lowercase alphabets. - Atleast one of its proper prefix matches with proper suffix of same length Given N and K,you have t
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