SP21861 STRNGSLV - I Love Strings
Description
Sacchi and Maurya are String lovers. They love to solve problems on strings. So our born-talented Priyun decided to ask them a problem on strings. He gave them a string of size S which consists of only small English letters. According to Priyun some of the alphabets are “Nice” and rest all are “Eww”. Now Priyun has a tolerance level of X “Eww”.
Priyun wants to know the distinct substrings of the given string which he can tolerate.
Even Sacchi and Maurya is finding it difficult to solve. So help them.
Input Format
The input file consists of several cases T (1
Output Format
Print a single integer for each testcase i.e the number of distinct substrings that Priyun can tolerate.