CodeForces 722B Verse Pattern (水题)
题意:统计元音,这里多加一个元音,y。
析:直接统计就好了。
代码如下:
#pragma comment(linker, "/STACK:1024000000,1024000000")
#include <cstdio>
#include <string>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <cstring>
#include <set>
#include <queue>
#include <algorithm>
#include <vector>
#include <map>
#include <cctype>
#include <cmath>
#include <stack>
//#include <tr1/unordered_map>
#define freopenr freopen("in.txt", "r", stdin)
#define freopenw freopen("out.txt", "w", stdout)
using namespace std;
//using namespace std :: tr1; typedef long long LL;
typedef pair<int, int> P;
const int INF = 0x3f3f3f3f;
const double inf = 0x3f3f3f3f3f3f;
const LL LNF = 0x3f3f3f3f3f3f;
const double PI = acos(-1.0);
const double eps = 1e-8;
const int maxn = 1e5 + 5;
const LL mod = 10000000000007;
const int N = 1e6 + 5;
const int dr[] = {-1, 0, 1, 0, 1, 1, -1, -1};
const int dc[] = {0, 1, 0, -1, 1, -1, 1, -1};
const char *Hex[] = {"0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111", "1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111"};
inline LL gcd(LL a, LL b){ return b == 0 ? a : gcd(b, a%b); }
inline int gcd(int a, int b){ return b == 0 ? a : gcd(b, a%b); }
int n, m;
const int mon[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
const int monn[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
inline int Min(int a, int b){ return a < b ? a : b; }
inline int Max(int a, int b){ return a > b ? a : b; }
inline LL Min(LL a, LL b){ return a < b ? a : b; }
inline LL Max(LL a, LL b){ return a > b ? a : b; }
inline bool is_in(int r, int c){
return r >= 0 && r < n && c >= 0 && c < m;
} int a[105];
char s[305]; int main(){
while(scanf("%d", &n) == 1){
for(int i = 0; i < n; ++i) scanf("%d", a+i);
getchar();
bool ok = true;
for(int i = 0; i < n; ++i){
gets(s);
m = strlen(s);
for(int j = 0; j < m; ++j)
if(s[j] == 'a' || s[j] == 'e' || s[j] == 'i' || s[j] == 'o' || s[j] == 'u' || s[j] == 'y') --a[i];
if(a[i] != 0) ok = false;
}
printf("%s\n", ok ? "YES" : "NO");
}
return 0;
}
CodeForces 722B Verse Pattern (水题)的更多相关文章
- Intel Code Challenge Elimination Round (Div.1 + Div.2, combined) B. Verse Pattern 水题
B. Verse Pattern 题目连接: http://codeforces.com/contest/722/problem/B Description You are given a text ...
- Codeforces Gym 100531G Grave 水题
Problem G. Grave 题目连接: http://codeforces.com/gym/100531/attachments Description Gerard develops a Ha ...
- codeforces 706A A. Beru-taxi(水题)
题目链接: A. Beru-taxi 题意: 问那个taxi到他的时间最短,水题; AC代码: #include <iostream> #include <cstdio> #i ...
- codeforces 569B B. Inventory(水题)
题目链接: B. Inventory time limit per test 1 second memory limit per test 256 megabytes input standard i ...
- Codeforces 489A SwapSort (水题)
A. SwapSort time limit per test 1 second memory limit per test 256 megabytes input standard input ou ...
- codeforces 688A A. Opponents(水题)
题目链接: A. Opponents time limit per test 1 second memory limit per test 256 megabytes input standard i ...
- CodeForces 534B Covered Path (水题)
题意:给定两个速度,一个一初速度,一个末速度,然后给定 t 秒时间,还每秒速度最多变化多少,让你求最长距离. 析:其实这个题很水的,看一遍就知道怎么做了,很明显就是先从末速度开始算起,然后倒着推. 代 ...
- Codeforces Gym 100286I iSharp 水题
Problem I. iSharpTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/ ...
- CodeForces 705A(训练水题)
题目链接:http://codeforces.com/problemset/problem/705/A 从第三个输出中可看出规律, I hate that I love that I hate it ...
随机推荐
- Codeforces827D. Best Edge Weight
$n \leq 2e5,m \leq 2e5$的有边权图,对每条边问:不改其他边的情况下这条边最多能是多少使得他一定在所有最小生成树上,如果无穷大输出-1. 典型题+耗时题,CF上的绝望时刻..打VP ...
- PatentTips - Solid State Memory Wear Leveling
BACKGROUND OF THE INVENTION Solid-state memory devices encompass rewritable non-volatile memory devi ...
- poj3694+hdu2460 求桥+缩点+LCA/tarjan
这个题使我更深理解了TARJAN算法,题意:无向图,每添加一条边后文桥的数量,三种解法:(按时间顺序),1,暴力,每每求桥,听说这样能过,我没过,用的hash判重,这次有俩个参数(n->10w, ...
- git服务端安装
Windows平台下Git服务器搭建 第一步:下载Java,下载地址:http://www.java.com/zh_CN/ 注意要下载是完整的JDK(其中有jre) 第二步:安装Java.安装步骤不 ...
- MySQL错误日志、binlog日志、查询日志、慢查询日志简介
1.数据库的日志是帮助数据库管理员,追踪分析数据库曾经发生的各种事件的有力依据,mysql中提供了错误日志.binlog日志(二进制日志).查处日志.慢查询日志.在此,我力求解决以下问题:各个日志的作 ...
- 使用POI操作Excel时new XSSFWorkbook ()报错java.lang.NoSuchMethodError解决方式
使用最新的POI3.11时,在执行 Workbook workBook = new XSSFWorkbook ();这段代码时出现错误: java.lang.NoSuchMethodError: j ...
- python第四讲
三元运算符: 三元运算又叫三目运算,是对简单的条件语句的缩写. 书写格式: n1 = 值1 if 条件 else 值2 # 如果条件成立,那么将 “值1” 赋值给n1变量,否则,将“值2”赋值给n1变 ...
- INTERSECT(交集)集合运算
在集合论中,两个集合(记为集合A和B)的交集是由既属于A,也属于B的所有元素组成的集合. 在T-SQL 中,INTERSECT 集合运算对两个输入查询的结果集取其交集,只返回在两个查询结果集中都出现的 ...
- HiWorkV1.3版震撼公布,今日起正式公开測试!
今天HiWork迎来了公开測试和V1.3大版本号更迭,HiWork集成的机器人达到20种,未读消息提醒亦可从不同维度进行设置,不断变好真是件振奋人心的事儿呢. 在这个看重颜值(kan lian)的互联 ...
- iOS音频播放 (四):AudioFile 转
原文出处 : http://msching.github.io/blog/2014/07/19/audio-in-ios-4/ 前言 接着第三篇的AudioStreamFile这一篇要来聊一下Audi ...