水题 Codeforces Beta Round #70 (Div. 2) A. Haiku
2024-08-29 17:04:30
/*
水题:三个字符串判断每个是否有相应的元音字母,YES/NO
下午网速巨慢:(
*/
#include <cstdio>
#include <cstring>
#include <string>
#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std; const int MAXN = 1e2 + ;
const int INF = 0x3f3f3f3f;
string s[]; int main(void) //Codeforces Beta Round #70 (Div. 2) A. Haiku
{
// freopen ("A.in", "r", stdin); while (getline (cin, s[]))
{
getline (cin, s[]); getline (cin, s[]);
// cout << s[0] << endl << s[1] << endl << s[2] << endl; continue; bool flag = true;
for (int i=; i<; ++i)
{
int cnt; int m = ;
if (i == || i == ) cnt = ;
else cnt = ;
for (int j=; s[i][j]; ++j)
{
if (s[i][j] == 'a' || s[i][j] == 'e' || s[i][j] == 'i' || s[i][j] == 'o'
|| s[i][j] == 'u') m++;
}
if (m != cnt) flag = false;
if (!flag) break;
} if (flag) puts ("YES");
else puts ("NO");
} return ;
}
最新文章
- POJ1849Two[DP|树的直径](扩展HDU4003待办)
- Spring学习 Ioc篇(一 )
- E: 软件包*需要重新安装,但是我无法找到相应的安装文件。(ubuntu14.04)
- [转]Delphi I/O Errors
- vim之执行shell命令
- B进制加法(洛谷1604)
- iOS之PCH文件
- Redhat 5上OPENLDAP的安装备份和恢复
- hive-jdbc获取查询日志慢的问题发现与解决
- 【安富莱原创开源应用第2期】基于RL-USB和RL-FlashFS的完整NAND解决方案,稳定好用,可放心用于产品批量
- P2495 [SDOI2011]消耗战 lca倍增+虚树+树形dp
- apache、nginx的虚拟域名配置和rewrite配置,以及web缓存的几种方式
- python之Oracle操作(cx_Oracle)
- Winform开发框架之简易工作流设计(转自 伍华聪博客)
- 《CEO说 像企业家一样思考》读书笔记
- scrapy爬虫框架之Xpath选择器
- jQuery EasyUI教程之datagrid应用-2
- 使用maven构建基本的web项目结构
- Fiddler2 抓取手机APP数据包
- 流程控制--while
热门文章
- activiti自己定义流程之自己定义表单(二):创建表单
- C语言最小生成树prim算法(USACO3.1)
- 跟面试官讲Binder(零)
- 设计模式C++实现_2_简单工厂模式
- Spring AOP监控SQL运行
- Java-ReentrantReadWriteLock的简单样例
- python 获取代码宿主机名 ip
- 设计模式-(17)策略模式 (swift版)
- UESTC149 解救小Q
- webstorm使用帮助(转自http://my.oschina.net/longteng2013/blog/138010),另外有部分内容摘自其它人博客