-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA. Haiku.cpp
More file actions
42 lines (30 loc) · 717 Bytes
/
A. Haiku.cpp
File metadata and controls
42 lines (30 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/// In the name of ALLAH
#include<bits/stdc++.h>
using namespace std;
#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
bool isVowel ( char c )
{
return ( c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' );
}
int main()
{
optimize();
vector<string> v;
int cnt[] = { 5, 7, 5 };
for ( int i = 0; i < 3; i++ ) {
string s;
char c;
cin >> c;
getline ( cin, s );
s = c + s;
v.push_back ( s );
}
for ( int i = 0; i < 3; i++ ) {
int c = 0;
for ( auto u : v[i] ) {
if ( isVowel(u) ) c++;
}
if ( c != cnt[i] ) return cout << "NO\n", 0;
}
cout << "YES\n";
}