根据题意,一步一步筛选
#include<iostream>
#include<cstdio>
#include<string.h>
#include<stdlib.h>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
string str;
char s[100000];
string fz="aeiou";
while(cin>>str){
if(str=="end") break;
if(str.find("a")<=str.size()||str.find("e")<=str.size()||str.find("i")<=str.size()||str.find("o")<=str.size()||str.find("u")<=str.size()){
int sum=0;
int sum2=0;
char shang='*';
int i;
for( i=0;i<str.size();i++){
if(fz.find(str[i])<=fz.size())
sum2=0,sum++;
else sum=0,sum2++;
if(sum>2||sum2>2){
break;
}
if(str[i]==str[i-1]&&str[i]!='e'&&str[i]!='o') {
break;
}
}
if(i==str.size()){
cout<<"<"+str+">";
printf(" is acceptable.\n");
}
else {
cout<<"<"+str+">";
printf(" is not acceptable.\n");
}
}
else {
cout<<"<"+str+">";
printf(" is not acceptable.\n");
}
}
return 0;
}