Ankit_132

A

Dec 6th, 2023
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int t;
  6.     cin>>t;
  7.  
  8.     map<char, int> vow;
  9.     vow['A'] = vow['E'] = vow['I'] = vow['O'] = vow['U'] = 1;
  10.  
  11.     while(t--)
  12.     {
  13.         string s;
  14.         cin>>s;
  15.  
  16.         int f = 1;
  17.  
  18.         f &= (!vow[s[0]] && vow[s[1]] && !vow[s[2]] && vow[s[3]] && !vow[s[4]] && vow[s[5]] && !vow[s[6]] && !vow[s[7]]);
  19.  
  20.         if(f)       cout<<"Yes\n";
  21.         else        cout<<"No\n";
  22.     }
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment