-
Notifications
You must be signed in to change notification settings - Fork 0
/
UVA11713.cpp
63 lines (60 loc) · 1.25 KB
/
UVA11713.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
54
55
56
57
58
59
60
61
62
63
#include<bits/stdc++.h>
using namespace std;
string str1,str2;
bool chk(int l1)
{
bool match=false;
for(int i=0; i<l1; i++)
{
if(str1[i]=='a' || str1[i]=='e' || str1[i]=='i' ||str1[i]=='o' ||str1[i]=='u')
{
if(str2[i]=='a' || str2[i]=='e' || str2[i]=='i' ||str2[i]=='o' ||str2[i]=='u')
{
match=true;
}
else
{
match=false;
return match;
}
}
else
{
if(str1[i]==str2[i])
{
match=true;
}
else
{
match=false;
return match;
}
}
}
return match;
}
int main()
{
int t;
cin>>t;
for(int i=1; i<=t; i++)
{
bool match=false;
cin>>str1>>str2;
int l1=str1.length();
int l2=str2.length();
if(l1==l2)
{
match=chk(l1);
if(match==true)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
else
cout<<"No"<<endl;
str1.clear();
str2.clear();
}
return 0;
}