-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1111A.cpp
More file actions
44 lines (41 loc) · 788 Bytes
/
Copy path1111A.cpp
File metadata and controls
44 lines (41 loc) · 788 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
43
44
#include <bits/stdc++.h>
using namespace std;
int main()
{
string s,t;
cin >> s >> t;
if(s.length()!=t.length())
cout << "NO" << endl;
else
{
std::vector<int> a;
std::vector<int> b;
std::vector<int> c;
std::vector<int> d;
for(int i=0;i<s.length();i++)
{
if(s[i]=='a' or s[i] == 'e' or s[i] == 'i' or s[i] == 'o' or s[i] =='u')
a.push_back(i);
else
b.push_back(i);
}
for(int i=0;i<t.length();i++)
{
if(t[i]=='a' or t[i] == 'e' or t[i] == 'i' or t[i] == 'o' or t[i] =='u')
c.push_back(i);
else
d.push_back(i);
}
sort(a.begin(),a.end());
sort(b.begin(),b.end());
sort(c.begin(),c.end());
sort(d.begin(),d.end());
if(a == c and b == d)
{
cout << "YES" << endl;
}
else
cout << "NO" << endl;
}
return 0;
}