水题 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 & ...
随机推荐
- topcoder srm 553
div1 250pt: 题意:... 解法:先假设空出来的位置是0,然后模拟一次看看是不是满足,如果不行的话,我们只需要关心最后栈顶的元素取值是不是受空白处的影响,于是还是模拟一下. // BEGIN ...
- centos 安装python2.7
安装pip sudo yum -y install epel-release sudo yum -y install python-pip 下载解压Python-2.7.3 #wget http:// ...
- 负载均衡之基于DNS负载
基于DNS的负载平衡 OK,在了解了负载平衡系统的大致组成及使用方式之后.我们就来看看各种负载解决方式. 当前业界中所最常使用的负载平衡解决方式主要分为三种:基于DNS的负载平衡,L3/4负载平衡,也 ...
- Hdfs的ACL測试
Hadoop从2.4.0版本号開始支持hdfs的ACL,在CDH5.0其中也集成了该特性,以下对其进行一些測试: unnamed user (file owner) 文件的拥有者 unnamed gr ...
- C语言细节笔记1
/******************************************************************************* ——笔记 1. 函数申明的书写. 可以 ...
- 嵌入式开发之davinci--- 8148/8168/8127 中的图像处理vpss link dei、sclr、swms、Mosaic’s
vpss 中的link (1)dei dei 主要做数据交错处理,带缩放 dei control data flow: (2)sclr 8168中支持缩放按比例的分子和分母,只支持缩小,貌似不支持放大 ...
- SpringMVC_配置和注解--跟海涛学SpringMVC(和自己在项目中的实际使用的对比)
Spring2.5 之前,我们都是通过实现Controller 接口或其实现来定义我们的处理器类,就像前面介绍的 这里介绍的是Spring3.1的新特性,虽然现在我用的是spring4.2.6,不过基 ...
- Linq:int类型使用Contains方法
获取的是前台传过来的String类型的值,例如:1,123,44,59 具体代码如下 if (!string.IsNullOrEmpty(str)) { string[] strArr = str.S ...
- BootstrapValidator demo
source:http://bv.doc.javake.cn/api/ BootstrapValidator is the best jQuery plugin to validate form fi ...
- POJ 1269 Intersecting Lines(线段相交,水题)
id=1269" rel="nofollow">Intersecting Lines 大意:给你两条直线的坐标,推断两条直线是否共线.平行.相交.若相交.求出交点. ...