Codeforces Round #497 (Div. 2) A. Romaji
http://codeforces.com/contest/1008/problems
#include <bits/stdc++.h>
using namespace std;
int main()
{
set<char>s;
s.insert('a');
s.insert('e');
s.insert('i');
s.insert('o');
s.insert('u');
string str;
cin>>str;
bool flag=true;
for(int i=0;i<str.length();i++)
{
if(s.find(str[i])==s.end())
{
if(str[i]=='n')continue;
else if(s.find(str[i+1])==s.end()||i==(str.length()-1))
{
flag=false;
}
}
}
if(flag)cout<<"YES"<<endl;
else cout<<"NO"<<endl;
//cout << "Hello world!" << endl;
return 0;
}
Codeforces Round #497 (Div. 2) A. Romaji的更多相关文章
- Codeforces Round #497 (Div. 2)
Codeforces Round #497 (Div. 2) https://codeforces.com/contest/1008 A #include<bits/stdc++.h> u ...
- Codeforces Round #497 (Div. 2) C. Reorder the Array
Bryce1010模板 http://codeforces.com/contest/1008/problems #include <bits/stdc++.h> using namespa ...
- Codeforces Round #497 (Div. 2)B. Turn the Rectangles
Bryce1010模板 http://codeforces.com/contest/1008/problems #include <bits/stdc++.h> using namespa ...
- Codeforces Round #366 (Div. 2) ABC
Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate ...
- Codeforces Round #354 (Div. 2) ABCD
Codeforces Round #354 (Div. 2) Problems # Name A Nicholas and Permutation standard input/out ...
- Codeforces Round #368 (Div. 2)
直达–>Codeforces Round #368 (Div. 2) A Brain’s Photos 给你一个NxM的矩阵,一个字母代表一种颜色,如果有”C”,”M”,”Y”三种中任意一种就输 ...
- cf之路,1,Codeforces Round #345 (Div. 2)
cf之路,1,Codeforces Round #345 (Div. 2) ps:昨天第一次参加cf比赛,比赛之前为了熟悉下cf比赛题目的难度.所以做了round#345连试试水的深浅..... ...
- Codeforces Round #279 (Div. 2) ABCDE
Codeforces Round #279 (Div. 2) 做得我都变绿了! Problems # Name A Team Olympiad standard input/outpu ...
- Codeforces Round #262 (Div. 2) 1003
Codeforces Round #262 (Div. 2) 1003 C. Present time limit per test 2 seconds memory limit per test 2 ...
随机推荐
- Vue实战指南之依赖注入(provide / inject)
案例 UI美眉说咱家的选项菜单太丑了,小哥哥能不能美化一下呀,洒家自然是说小意思啦~自定义一个select组件,so easy~ 简单粗暴型: <el-select v-model=" ...
- MySQL学习笔记(一)——数据库基础
自己上大学时也学习过数据库,做开发时也用到过,但是做界面开发对于数据库的使用相对来说是比较简单的,大学时系统学习的数据库也还给老师了,在测试工作中也只是用到了一些基础sql,增删改查这一类的,但是自己 ...
- BestCoder3 1002 BestCoder Sequence(hdu 4908) 解题报告
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4908 题目意思:给出 一个从1~N 的排列你和指定这个排列中的一个中位数m,从这个排列中找出长度为奇数 ...
- CI 模型公用查询函数
/** * 多字段条件查询数据 * @param array $val array("name" => $value).name为要操作的字段,value为要操作的值 * @ ...
- 简单快捷地测试 JPush API
随着 JPush API v3版本的推出,加上之前开放的 Report API,JPush API 逐渐切换为比较好的符合 REST API 的规范,从而也很容易地使用一般的 HTTP/REST 工具 ...
- 值域线段树 bzoj 4627
这是题目链接4627: [BeiJing2016]回转寿司 题目大意: 给定n个数,求有多少个字段和在 满足 L<=sum<=R; 解题思路 需要解这个题目,需要有线段树加可持续化的思想, ...
- python3 安装 opencv3 (win10,64bit)
python3只能安装opencv3 (python2安装opencv应该比python3安装的要简单,可参阅网上其他教程) 步骤参考http://stackoverflow.com/quest ...
- python中元组tuple
python中列表(list)和元组(tuple)有很多相似的地方,它们都是容器,由一系列的对象构成,都可以包含任意类型的元素,甚至是一个序列. list和tuple的不同首先体现在写法上: li ...
- RTC驱动程序分析
drivers\rtc\rtc-s3c.c s3c_rtc_init platform_driver_register s3c_rtc_probe ...
- bzoj1095
动态点分治 先建出点分树,每个点上维护两个堆,s1,s2,分别表示子树中到点分树中父亲的所有长度,每个儿子s1的最大值,那么对于每个点答案就是s2的最大+次大,再维护一个s3保存这个. 首先我们要搞一 ...