-
Notifications
You must be signed in to change notification settings - Fork 0
/
1111.cpp
53 lines (52 loc) · 1.22 KB
/
1111.cpp
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
43
44
45
46
47
48
49
50
51
52
53
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s1,s2;
cin >> s1 >> s2;
int l1=s1.length();
int l2=s2.length();
int cont1=0,cont2=0,l;
bool f=false;
if(l1<l2)
{
l=l2;
}
else l=l1;
for(int i=0; i<l; i++)
{
if(s1[i]=='a'||s1[i]=='e'||s1[i]=='i'||s1[i]=='o'||s1[i]=='u')
{
if(s2[i]=='a'||s2[i]=='e'||s2[i]=='i'||s2[i]=='o'||s2[i]=='u')
{
f=true;
}
}
else if(s1[i]!='a'||s1[i]!='e'||s1[i]!='i'||s1[i]!='o'||s1[i]!='u')
{
if(s2[i]!='a'||s2[i]!='e'||s2[i]!='i'||s2[i]!='o'||s2[i]!='u')
{
f=true;
}
}
else if(s1[i]!='a'||s1[i]!='e'||s1[i]!='i'||s1[i]!='o'||s1[i]!='u')
{
if(s2[i]=='a'||s2[i]=='e'||s2[i]=='i'||s2[i]=='o'||s2[i]=='u')
{
f=false;
}
}
else if(s1[i]!='a'||s1[i]!='e'||s1[i]!='i'||s1[i]!='o'||s1[i]!='u')
{
if(s2[i]=='a'||s2[i]=='e'||s2[i]=='i'||s2[i]=='o'||s2[i]=='u')
{
f=false;
}
}
}
if(f)
{
printf("Yes\n");
}
else printf("No\n");
}