My issue
why the code is failed in test cases the concept was right no…
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--){
int k;
string s;
cin>>k>>s;
int count=0;
for(int i=0;i<k;i++){
if(s[i]!='a' && s[i]!='e'&& s[i]!='i'&& s[i]!='0'&& s[i]!='u'){
count++;
if(count==4){
break;
}
}
else{
count=0;
continue;
}
}
if(count<4){
cout<<"YES"<<endl;
}
else{
cout<<"NO"<<endl;
}
}
return 0;
}
Problem Link: Easy Pronunciation Practice Coding Problem - CodeChef