A. Superhero Transformation
We all know that a superhero can transform to certain other superheroes. But not all Superheroes can transform to any other superhero. A superhero with name ss can transform to another superhero with name tt if ss can be made equal to tt by changing any vowel in ss to any other vowel and any consonant in ss to any other consonant. Multiple changes can be made.
In this problem, we consider the letters 'a', 'e', 'i', 'o' and 'u' to be vowels and all the other letters to be consonants.
Given the names of two superheroes, determine if the superhero with name ss can be transformed to the Superhero with name tt.
Input
The first line contains the string ss having length between 11 and 10001000, inclusive.
The second line contains the string tt having length between 11 and 10001000, inclusive.
Both strings ss and tt are guaranteed to be different and consist of lowercase English letters only.
Output
Output "Yes" (without quotes) if the superhero with name ss can be transformed to the superhero with name tt and "No" (without quotes) otherwise.
You can print each letter in any case (upper or lower).
Examples
input
a u
output
Yes
input
abc ukm
output
Yes
input
akm ua
output
No
代码:
#include<iostream>
#include<algorithm>
#include<cstring>
#include<string>
#include<cstdio>
#include<cmath>
#include<set>
#include<map>
using namespace std;
#define ll long long
#define inf 0x3f3f3f3f
#define mem(a,b) memset(a,b,sizeof(a))
#define closeio std::ios::sync_with_stdio(false)
int main()
{
string s1,s2;
int i,flag=0;
cin>>s1>>s2;
if(s1.length()!=s2.length())
{
cout<<"No"<<endl;
return 0;
}
else
{
for(i=0;i<s1.length();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')
continue;
else
flag=1;
}
else
{
if(s2[i]=='a'||s2[i]=='e'||s2[i]=='i'||s2[i]=='o'||s2[i]=='u')
flag=1;
}
}
}
if(flag)
cout<<"No"<<endl;
else
cout<<"Yes"<<endl;
return 0;
}