# |
Author |
Problem |
Lang |
Verdict |
Time |
Memory |
Sent |
Judged |
|
70005601 |
Practice:
Perdente |
1111A
- 46
|
GNU C++14
|
Compilation error
|
0 ms
|
0 KB
|
2020-02-02 07:40:09 |
2020-02-02 07:40:09 |
|
#include<bits/stdc++.h>
#include "fifo_map.hpp"
/// Constants
#define INF 1e9+7
#define PI acos(-1.0) // 3.1415926535897932
#define Loser ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
#define GCD(a,b) __gcd(a,b)
#define LCM(a,b) (a*(b/__gcd(a,b) ))
#define mp make_pair
#define pb push_back
#define rev(v) reverse(v.begin(),v.end())
#define srt(v) sort(v.begin(),v.end())
#define grtsrt(v) sort(v.begin(),v.end(),greater<ll>())
#define hellyeah exit(0)
#define file freopen("input.txt","r",stdin);
///==========DEBUGGING=============///
#define debug(a) cout<<"*"<<a<<endl;
#define debug2(a,b) cout<<"$"<<a<<" "<<b<<endl;
#define debug3(a,b,c) cout<<"$"<<a<<" "<<b<<" "<<c<<endl;
#define check cout<<"Avenger's Assemble"<<endl;
#define lol cout<<'\n';
typedef long long ll;
typedef unsigned long long ull;
using nlohmann::fifo_map;
using namespace std;
int middle(int a, int b, int c) { if ((a <= b && b <= c) || (c <= b && b <= a)) return b;else if ((b <= a && a <= c) || (c <= a && a <= b))return a;else return c; }
/*max element in map*/
template<typename KeyType, typename ValueType>
std::pair<KeyType,ValueType> get_max( const std::map<KeyType,ValueType>& x ) {
using pairtype=std::pair<KeyType,ValueType>;
return *std::max_element(x.begin(), x.end(), [] (const pairtype & p1, const pairtype & p2) {
return p1.second < p2.second;//min->p1.second>p2.second
});
//auto max=get_max(x);
//std::cout << max.first << "=>" << max.second << std::endl;
//set->max:m=*a.rbegin();min:mi=*a.begin();
}
static inline bool isvowel(char ch)
{
static const std::string vowels("aeiouEAIOU");
return vowels.end() != std::find(vowels.begin(), vowels.end(), ch);
}
template <typename Map>
bool map_compare (Map const &lhs, Map const &rhs) {
return lhs.size() == rhs.size()
&& std::equal(lhs.begin(), lhs.end(),
rhs.begin());
}
/*------------------------------------------------------------------------------------------------------------------------------------------------------*/
int main()
{
Loser
string s,t;cin>>s>>t;
fifo_map<char,bool>mp,mp1;
for(int i=0;i<s.size();++i)
{
if(isvowel(s[i]))mp[s[i]]=true;
else mp[s[i]]=false;
}
for(int i=0;i<t.size();++i)
{
if(isvowel(t[i]))mp1[t[i]]=true;
else mp1[t[i]]=false;
}
//for(auto i:mp)cout<<i.first<<" "<<i.second<<endl;
//for(auto i:mp1)cout<<i.first<<" "<<i.second<<endl;
bool flag=true;
if(mp.size()==mp1.size())
{
for(auto i=mp.begin(),j=mp1.begin();i!=mp.end(),j!=mp1.end();++i,++j)
{
if((*i).second!=(*j).second)flag=false;
}
}
else flag=false;
cout<<(flag?"YES\n":"NO\n");
return 0;
}
Click to see test details