305323: CF1008A. Romaji
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Romaji
题意翻译
伯兰语有五个元音字母,分别是 `a`,`e`,`i`,`o`,`u`。伯兰语单词中的每一个非元音(除了 `n`)后都是元音或 `n`(没有字母也不行,即单词末尾必须是这六个字符之一)。而元音和 `n` 没有此限制。 如 `harakiri`,`yupie`,`man` 和 `nbo` 都是符合规范的,而 `horse`,`king`,`my`,`nz` 都不符合。给你一个单词,问是否符合伯兰语单词的规范。 输入仅一行,是你需要判断是否符合规范的单词。 输出仅一行,若符合则输出 `YES`,否则输出 `NO`。 样例解释3:字母 `r` 后是 `c`,不属于元音或 `n` 且单词末尾是 `s`,不符合要求,故输出 `NO`。题目描述
Vitya has just started learning Berlanese language. It is known that Berlanese uses the Latin alphabet. Vowel letters are "a", "o", "u", "i", and "e". Other letters are consonant. In Berlanese, there has to be a vowel after every consonant, but there can be any letter after any vowel. The only exception is a consonant "n"; after this letter, there can be any letter (not only a vowel) or there can be no letter at all. For example, the words "harakiri", "yupie", "man", and "nbo" are Berlanese while the words "horse", "king", "my", and "nz" are not. Help Vitya find out if a word $ s $ is Berlanese.输入输出格式
输入格式
The first line of the input contains the string $ s $ consisting of $ |s| $ ( $ 1\leq |s|\leq 100 $ ) lowercase Latin letters.
输出格式
Print "YES" (without quotes) if there is a vowel after every consonant except "n", otherwise print "NO". You can print each letter in any case (upper or lower).
输入输出样例
输入样例 #1
sumimasen
输出样例 #1
YES
输入样例 #2
ninja
输出样例 #2
YES
输入样例 #3
codeforces
输出样例 #3
NO