水题 Codeforces Beta Round #70 (Div. 2) A. Haiku
/*
水题:三个字符串判断每个是否有相应的元音字母,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 ;
}
水题 Codeforces Beta Round #70 (Div. 2) A. Haiku的更多相关文章
- Codeforces Beta Round #70 (Div. 2)
Codeforces Beta Round #70 (Div. 2) http://codeforces.com/contest/78 A #include<bits/stdc++.h> ...
- codeforces水题100道 第二十六题 Codeforces Beta Round #95 (Div. 2) A. cAPS lOCK (strings)
题目链接:http://www.codeforces.com/problemset/problem/131/A题意:字符串大小写转换.C++代码: #include <cstdio> #i ...
- codeforces水题100道 第二十四题 Codeforces Beta Round #85 (Div. 2 Only) A. Petya and Strings (strings)
题目链接:http://www.codeforces.com/problemset/problem/112/A题意:忽略大小写,比较两个字符串字典序大小.C++代码: #include <cst ...
- codeforces水题100道 第二十三题 Codeforces Beta Round #77 (Div. 2 Only) A. Football (strings)
题目链接:http://www.codeforces.com/problemset/problem/96/A题意:判断一个0-1字符串中出现的最长的0字串或者1字串的长度是否大于等于7.C++代码: ...
- codeforces水题100道 第二十二题 Codeforces Beta Round #89 (Div. 2) A. String Task (strings)
题目链接:http://www.codeforces.com/problemset/problem/118/A题意:字符串转换……C++代码: #include <string> #inc ...
- codeforces水题100道 第二十一题 Codeforces Beta Round #65 (Div. 2) A. Way Too Long Words (strings)
题目链接:http://www.codeforces.com/problemset/problem/71/A题意:将长字符串改成简写格式.C++代码: #include <string> ...
- codeforces水题100道 第十七题 Codeforces Beta Round #25 (Div. 2 Only) A. IQ test (brute force)
题目链接:http://www.codeforces.com/problemset/problem/25/A题意:在n个书中找到唯一一个奇偶性和其他n-1个数不同的数.C++代码: #include ...
- codeforces水题100道 第十二题 Codeforces Beta Round #91 (Div. 2 Only) A. Lucky Division (brute force)
题目链接:http://www.codeforces.com/problemset/problem/122/A题意:判断一个数是否能被一个lucky number整除,一个lucky number是一 ...
- codeforces水题100道 第九题 Codeforces Beta Round #63 (Div. 2) Young Physicist (math)
题目链接:http://www.codeforces.com/problemset/problem/69/A题意:给你n个三维空间矢量,求这n个矢量的矢量和是否为零.C++代码: #include & ...
随机推荐
- 随机森林、gbdt算法
http://blog.csdn.net/songzitea/article/details/10035757 http://blog.csdn.net/holybin/article/details ...
- 看懂JSP声明的格式。。。
在WebRoot下新建test3.jsp 改动body内容: <%! int a = 3; %> <% int b = 3; %> <%= a-- %& ...
- The Pilots Brothers' refrigerator-DFS路径打印
I - The Pilots Brothers' refrigerator Time Limit:1000MS Memory Limit:65536KB 64bit IO Format ...
- 第3周课后实践·程序阅读(4)-利用引用訪问私有数据成员
/* * Copyright (c) 2015, 烟台大学计算机学院 * All rights reserved. * 文件名:test.cpp * 作 者:刘畅 * 完毕日期:2015年 3 月 2 ...
- centos6.5 yum安装MySQL5.6
创建MySQL用户 #useradd mysql #passwd mysql #chmod u+w /etc/sudoers #vi /etc/sudoers mysql ALL=(ALL) ALL ...
- YTU 2572: 猜灯谜
2572: 猜灯谜 时间限制: 1 Sec 内存限制: 128 MB 提交: 154 解决: 91 题目描述 A 村的元宵节灯会上有一迷题: 请猜谜 * 请猜谜 = 请边赏灯边猜 小明想,一定是每 ...
- YTU 2801: 用数字造数字(II)
2801: 用数字造数字(II) 时间限制: 1 Sec 内存限制: 128 MB 提交: 244 解决: 168 题目描述 输入一个3位以上的整数,求其中最大的两个数字之和与最小的数字之和之间的 ...
- [开源下载] 【开源项目】EasySL for Silverlight 4
[开源下载] [开源项目]EasySL for Silverlight 4 [复制链接] silverlight 452 主题 7 好友 1万 积分 管理员 贡献 879 原创 0 银元 ...
- java代码实现JDBC连接MySql以及引用驱动程序包
JDBC链接MySql JDBC链接MySql的话题已经老掉牙了,这次我只想通过使用简洁的代码实现,采用封装的思想,将链接MySql的代码封装在类的静态方法中,供一次性调用返回java.sql ...
- 并不对劲的bzoj4198:loj2132:uoj130:p2168:[NOI2015]荷马史诗
题目大意 有\(n\)(\(n\leq10^5\))种单词,其中第\(i\)种单词在文章中的出现次数为\(w_i\) 要将每个单词替换成一个字符集为\(k\)(\(k\leq9\))的字符串,使对于任 ...