My issue
My code
#include<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
char str[100];
int n;
cin>>n;
for(int i=0;i<n;i++)
{
cin>>str[i];
}
int c=0;
for(int i=0;i<n;i++)
{
if(str[i]=='a'||str[i]=='e'||str[i]=='i'||str[i]=='o'||str[i]=='u')
{
c=0;
}
else if(str[i]!='a'||str[i]!='e'||str[i]!='i'||str[i]!='o'||str[i]!='u')
{
c++;
}
if(c>=4)
{
cout<<"NO"<<endl;
break;
}
}
if(c<4)
{
cout<<"YSE"<<endl;
}
}
return 0;
}
Problem Link: EZSPEAK Problem - CodeChef