[Solution] Easy Pronunciation CodeChef Solution
Words that contain many consecutive consonants, like "schtschurowskia
", are generally considered somewhat hard to pronounce.
We say that a word is hard to pronounce if it contains or more consonants in a row; otherwise it is easy to pronounce. For example, "apple" and "polish" are easy to pronounce, but "schtschurowskia" is hard to pronounce.
You are given a string consisting of lowercase Latin characters. Determine whether it is easy to pronounce or not based on the rule above — print YES
if it is easy to pronounce and NO
otherwise.
For the purposes of this problem, the vowels are the characters and the consonants are the
other characters.
Input Format
- The first line of input will contain a single integer , denoting the number of test cases.
- Each test case consists of two lines of input.
- The first line of each test case contains a single integer , the length of string .
- The second line of each test case contains the string .
Output Format
For each test case, output on a new line the answer — YES
if is easy to pronounce, and NO
otherwise.
Each character of the output may be printed in either uppercase or lowercase. For example, the strings YES
, yeS
, yes
, and YeS
will all be treated as identical.
Constraints
- contains only lowercase Latin characters, i.e, the characters
No comments:
Post a Comment