水题 Codeforces Beta Round #70 (Div. 2) A. Haiku

时间:2023-03-09 18:36:33
水题 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 ;
}