My issue
on submitting test cases are not passing
My code
#include <iostream>
#include <string>
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--){
int n;
cin>>n;
string a;
cin>>a;
int count = 0;
int maxcount =0;
for(int i =0; i<n; i++){
if(a[i] != 'a' and a[i] != 'i' and a[i] != 'o' and a[i] != 'u' and a[i] != 'e' ){
count++;
}
else{
if(count > maxcount){
maxcount = count;
count = 0;
}
}
}
if(count > maxcount and maxcount == 0){
maxcount = count;
count = 0;
}
if(maxcount >= 4){
cout<<"NO"<<endl;
}
else{
cout<<"YES" <<endl;
}
}
return 0;
}
Problem Link: EZSPEAK Problem - CodeChef