STL解法
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
stack<char>s;
char a;
string ans;
while (cin >> a)
{
s.push(a);
if (a == 'a' || a == 'i' || a == 'u' || a == 'e' || a == 'o')
{
s.pop();
}
}
while (!s.empty())
{
ans += s.top();
s.pop();
}
reverse(ans.begin(), ans.end());
cout << ans << endl;
return 0;
}