Advertisement
sherry_ahmos

Untitled

Aug 2nd, 2022
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.10 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <vector>
  4. #include <string>
  5. #include <queue>
  6. #include <map>
  7. #include <set>
  8. #include <string>
  9. #include <algorithm>
  10. #include <cmath>
  11. #include <unordered_map>
  12.  
  13. using namespace std;
  14. #define ll long long
  15. #define nl endl
  16. #define cy cout << "YES\n"
  17. #define cn cout << "NO\n"
  18. #define sz s.size()
  19.  
  20. void sherry()
  21. {
  22.     ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  23. #ifndef ONLINE_JUDGE
  24.     freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
  25. #endif
  26. }
  27. int main()
  28. {
  29.     sherry();
  30.     string s;
  31.     cin >> s;
  32.     bool flag = true;
  33.     for (int i = 0; i < sz; i++)
  34.     {
  35.         s[i] = tolower(s[i]);
  36.         s[i + 1] = tolower(s[i + 1]);
  37.  
  38.         if (s[i] != 'a' && s[i] != 'o' && s[i] != 'u' && s[i] != 'i' && s[i] != 'e' && s[i] != 'n')
  39.         {
  40.             if (s[i + 1] != 'a' && s[i + 1] != 'o' && s[i + 1] != 'u' && s[i + 1] != 'i' && s[i + 1] != 'e')
  41.             {
  42.                 cn;
  43.                 flag = false;
  44.                 break;
  45.             }
  46.         }
  47.     }
  48.     if (flag)
  49.         cy;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement