|@Rahul Jadhav 1||458|
In this problem, a String S is composed of lowercase alphabets and wildcard characters i.e. '?'. Here, '?' can be replaced by any of the lowercase alphabets. Now you have to classify the given String on the basis of following rules:
If there are more than 3 consonants together or more than 5 vowels together, the String is considered to be "BAD". A String is considered "GOOD" only if it is not “BAD”.
NOTE: String is considered as "BAD" if the above condition is satisfied even once. Else it is "GOOD" and the task is to make the string "BAD".
The first line consists of an integer T i.e number of test cases. T testcases follow. The first and only line of each test case consists of a string S.
For each testcase, in a new line, print "1" if string is GOOD, else print "0".
1 <= T <= 100
1 <= |S| <= 100
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?Yes