CodeGraderBench/CodeGraderBench huggingface dataset:
Problem: Problem Description

You are building a text analyzer tool. One of its features is detecting vowel clusters in a word.

Your task is to write a program that takes a word and counts how many vowel clusters it contains.

What is a Vowel Cluster?

A vowel cluster is a group of one or more vowels (a, e, i, o, u) that appear consecutively without any consonants in between.

Examples:

- "ae" is one vowel cluster.  
- "a" is one vowel cluster.  
- "abc" has one vowel cluster: "a".  

For example, in the word "beautiful", the vowels "eau" form one vowel cluster. Later, "i" and "u" form their own clusters. Hence, the word contains 3 vowel clusters in total.

--------------------------------------------------

Input Format

- An integer n, the length of the word.  
- A word of n lowercase English letters.

--------------------------------------------------

Output Format

- Print a single integer representing the number of vowel clusters in the word.

--------------------------------------------------

Assumptions on Input

1 <= n <= 100000  

--------------------------------------------------

Note

- Do not print any extra messages such as:
  cout << "Enter a number"
  cout << "The computed answer is"
- Use cout only to print the computed final output.
- Do not print unnecessary spaces.
- Do not hard-code the result.
- If any test case passes by simply printing output without logic, marks will not be awarded.

Student submission:
#include <simplecpp>

int cv(char a){
    if(a == 'a' || a == 'e' || a == 'i' || a == 'o' || a == 'u'){
        return 1;
    }
    else{
        return 0;
    }
}


main_program{
    int n;
    cin >> n;
    int ans = 0;
    int state = 0;
    for(int i = 0; i<n; i++){
        char inp;
        cin >> inp;
        int alpha = cv(inp);
        if(state == 0 && alpha==1){
            ans++;
            state = 1;
        }
        else if(state == 1 && alpha==0){
            state = 0;
        }
    }
    cout << ans << endl;
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variables as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Problem Description

You are building a text analyzer tool. One of its features is detecting vowel clusters in a word.

Your task is to write a program that takes a word and counts how many vowel clusters it contains.

What is a Vowel Cluster?

A vowel cluster is a group of one or more vowels (a, e, i, o, u) that appear consecutively without any consonants in between.

Examples:

- "ae" is one vowel cluster.  
- "a" is one vowel cluster.  
- "abc" has one vowel cluster: "a".  

For example, in the word "beautiful", the vowels "eau" form one vowel cluster. Later, "i" and "u" form their own clusters. Hence, the word contains 3 vowel clusters in total.

--------------------------------------------------

Input Format

- An integer n, the length of the word.  
- A word of n lowercase English letters.

--------------------------------------------------

Output Format

- Print a single integer representing the number of vowel clusters in the word.

--------------------------------------------------

Assumptions on Input

1 <= n <= 100000  

--------------------------------------------------

Note

- Do not print any extra messages such as:
  cout << "Enter a number"
  cout << "The computed answer is"
- Use cout only to print the computed final output.
- Do not print unnecessary spaces.
- Do not hard-code the result.
- If any test case passes by simply printing output without logic, marks will not be awarded.

Student submission:
#include <simplecpp>

main_program {
    int n;
    char a;
    int x = 0;
    int y = 0;
    cin >> n;

    repeat(n) {
        cin >> a;
        if (a == 97 || a == 101 || a== 105 || a== 111 || a==117) {
            if (y == 0){
                x++;
                y = 1;
            }
        } else {
            y = 0;
        }
    }
    cout << x;  
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variables as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Problem Description

You are building a text analyzer tool. One of its features is detecting vowel clusters in a word.

Your task is to write a program that takes a word and counts how many vowel clusters it contains.

What is a Vowel Cluster?

A vowel cluster is a group of one or more vowels (a, e, i, o, u) that appear consecutively without any consonants in between.

Examples:

- "ae" is one vowel cluster.  
- "a" is one vowel cluster.  
- "abc" has one vowel cluster: "a".  

For example, in the word "beautiful", the vowels "eau" form one vowel cluster. Later, "i" and "u" form their own clusters. Hence, the word contains 3 vowel clusters in total.

--------------------------------------------------

Input Format

- An integer n, the length of the word.  
- A word of n lowercase English letters.

--------------------------------------------------

Output Format

- Print a single integer representing the number of vowel clusters in the word.

--------------------------------------------------

Assumptions on Input

1 <= n <= 100000  

--------------------------------------------------

Note

- Do not print any extra messages such as:
  cout << "Enter a number"
  cout << "The computed answer is"
- Use cout only to print the computed final output.
- Do not print unnecessary spaces.
- Do not hard-code the result.
- If any test case passes by simply printing output without logic, marks will not be awarded.

Student submission:
#include<simplecpp>
main_program
{
    int n;
    cin>>n;
   
    int vowelcluster=0;
    char prev;
    int count=0;
    for(int i=1;i<=n;i++)
     {
         char x;
         cin>>x;
         if(x=='a'||x=='e'||x=='i'||x=='o'||x=='u')
         {  count++;
              if(count!=1)
           {  if(prev=='a' || prev=='e'||prev=='i'||prev=='o'||prev=='u')
             {   }
             else
             { vowelcluster++;
             }
             
             
             }  
             if(count==1) 
           {  
             vowelcluster++;}
         }
         prev=x;
     
     }
     cout<<vowelcluster;


}

Grading criterion: Declaration of variables
Rating A: correctly declares the variables as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Problem Description

You are building a text analyzer tool. One of its features is detecting vowel clusters in a word.

Your task is to write a program that takes a word and counts how many vowel clusters it contains.

What is a Vowel Cluster?

A vowel cluster is a group of one or more vowels (a, e, i, o, u) that appear consecutively without any consonants in between.

Examples:

- "ae" is one vowel cluster.  
- "a" is one vowel cluster.  
- "abc" has one vowel cluster: "a".  

For example, in the word "beautiful", the vowels "eau" form one vowel cluster. Later, "i" and "u" form their own clusters. Hence, the word contains 3 vowel clusters in total.

--------------------------------------------------

Input Format

- An integer n, the length of the word.  
- A word of n lowercase English letters.

--------------------------------------------------

Output Format

- Print a single integer representing the number of vowel clusters in the word.

--------------------------------------------------

Assumptions on Input

1 <= n <= 100000  

--------------------------------------------------

Note

- Do not print any extra messages such as:
  cout << "Enter a number"
  cout << "The computed answer is"
- Use cout only to print the computed final output.
- Do not print unnecessary spaces.
- Do not hard-code the result.
- If any test case passes by simply printing output without logic, marks will not be awarded.

Student submission:
#include<simplecpp>
main_program{
int n;
int ans=0;
int temp=0;
int cluster=0;
cin>>n;
char le;
repeat(n){
cin>>le;  
if(le=='a'||le=='e'||le=='i'||le=='o'||le=='u'){
ans=cluster+1;
}else
temp=ans;
if(ans>(temp+1)){
    --ans;}
    cluster=ans;
}    
cout<<ans;
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variables as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Problem Description

You are building a text analyzer tool. One of its features is detecting vowel clusters in a word.

Your task is to write a program that takes a word and counts how many vowel clusters it contains.

What is a Vowel Cluster?

A vowel cluster is a group of one or more vowels (a, e, i, o, u) that appear consecutively without any consonants in between.

Examples:

- "ae" is one vowel cluster.  
- "a" is one vowel cluster.  
- "abc" has one vowel cluster: "a".  

For example, in the word "beautiful", the vowels "eau" form one vowel cluster. Later, "i" and "u" form their own clusters. Hence, the word contains 3 vowel clusters in total.

--------------------------------------------------

Input Format

- An integer n, the length of the word.  
- A word of n lowercase English letters.

--------------------------------------------------

Output Format

- Print a single integer representing the number of vowel clusters in the word.

--------------------------------------------------

Assumptions on Input

1 <= n <= 100000  

--------------------------------------------------

Note

- Do not print any extra messages such as:
  cout << "Enter a number"
  cout << "The computed answer is"
- Use cout only to print the computed final output.
- Do not print unnecessary spaces.
- Do not hard-code the result.
- If any test case passes by simply printing output without logic, marks will not be awarded.

Student submission:
#include<simplecpp> 
main_program{
 int n,m,out=0;
 cin>>n;
 m=n-1;
 char PL;
 cin>>PL;
 while(m--){
  char L;
  cin>>L;
  if((L=='a'||L=='e'||L=='i'||L=='o'||L=='u')&&(PL!='a'&&PL!='e'&&PL!='i'&&PL!='o'&&PL!='u')) out=out+1;
  else ;
  PL=L;
 }
cout<<out<<endl;
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variables as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Problem Description

You are building a text analyzer tool. One of its features is detecting vowel clusters in a word.

Your task is to write a program that takes a word and counts how many vowel clusters it contains.

What is a Vowel Cluster?

A vowel cluster is a group of one or more vowels (a, e, i, o, u) that appear consecutively without any consonants in between.

Examples:

- "ae" is one vowel cluster.  
- "a" is one vowel cluster.  
- "abc" has one vowel cluster: "a".  

For example, in the word "beautiful", the vowels "eau" form one vowel cluster. Later, "i" and "u" form their own clusters. Hence, the word contains 3 vowel clusters in total.

--------------------------------------------------

Input Format

- An integer n, the length of the word.  
- A word of n lowercase English letters.

--------------------------------------------------

Output Format

- Print a single integer representing the number of vowel clusters in the word.

--------------------------------------------------

Assumptions on Input

1 <= n <= 100000  

--------------------------------------------------

Note

- Do not print any extra messages such as:
  cout << "Enter a number"
  cout << "The computed answer is"
- Use cout only to print the computed final output.
- Do not print unnecessary spaces.
- Do not hard-code the result.
- If any test case passes by simply printing output without logic, marks will not be awarded.

Student submission:
#include<simplecpp>
int s=0;
int word(int n){
    char x;
    cin>>x;
    if(x=='a'||x=='e'||x=='i'||x=='o'||x=='u'){
        s++;
    }
    return s;

}
main_program{
    int n;
    cin>>n;
    for(int i=1;i<=n-1;i++){
        word(i);
    }
    int y=word(n);
    if(n==9){
        cout<<y-2;
    }
    else if(n==7){
        cout<<y-1;
    }
    else{
        cout<<y;
    }


}

Grading criterion: Declaration of variables
Rating A: correctly declares the variables as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Problem Description

You are building a text analyzer tool. One of its features is detecting vowel clusters in a word.

Your task is to write a program that takes a word and counts how many vowel clusters it contains.

What is a Vowel Cluster?

A vowel cluster is a group of one or more vowels (a, e, i, o, u) that appear consecutively without any consonants in between.

Examples:

- "ae" is one vowel cluster.  
- "a" is one vowel cluster.  
- "abc" has one vowel cluster: "a".  

For example, in the word "beautiful", the vowels "eau" form one vowel cluster. Later, "i" and "u" form their own clusters. Hence, the word contains 3 vowel clusters in total.

--------------------------------------------------

Input Format

- An integer n, the length of the word.  
- A word of n lowercase English letters.

--------------------------------------------------

Output Format

- Print a single integer representing the number of vowel clusters in the word.

--------------------------------------------------

Assumptions on Input

1 <= n <= 100000  

--------------------------------------------------

Note

- Do not print any extra messages such as:
  cout << "Enter a number"
  cout << "The computed answer is"
- Use cout only to print the computed final output.
- Do not print unnecessary spaces.
- Do not hard-code the result.
- If any test case passes by simply printing output without logic, marks will not be awarded.

Student submission:
#include<simplecpp>
main_program{
    int n;
    cin>>n;
    char c;
    char prevc='*';
    int x=0;
    for(int i=1;i<=n;i++){
        cin>>c;
        if((prevc=='a' || prevc=='e' || prevc=='i' || prevc=='o' || prevc=='u') && (c=='a' || c=='e' || c=='i' || c=='o' || c=='u') ) continue;
        if(c=='a' || c=='e' || c=='i' || c=='o' || c=='u'){
            x++;
        }
        prevc=c;
    }
    cout<<x;
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variables as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Problem Description

You are building a text analyzer tool. One of its features is detecting vowel clusters in a word.

Your task is to write a program that takes a word and counts how many vowel clusters it contains.

What is a Vowel Cluster?

A vowel cluster is a group of one or more vowels (a, e, i, o, u) that appear consecutively without any consonants in between.

Examples:

- "ae" is one vowel cluster.  
- "a" is one vowel cluster.  
- "abc" has one vowel cluster: "a".  

For example, in the word "beautiful", the vowels "eau" form one vowel cluster. Later, "i" and "u" form their own clusters. Hence, the word contains 3 vowel clusters in total.

--------------------------------------------------

Input Format

- An integer n, the length of the word.  
- A word of n lowercase English letters.

--------------------------------------------------

Output Format

- Print a single integer representing the number of vowel clusters in the word.

--------------------------------------------------

Assumptions on Input

1 <= n <= 100000  

--------------------------------------------------

Note

- Do not print any extra messages such as:
  cout << "Enter a number"
  cout << "The computed answer is"
- Use cout only to print the computed final output.
- Do not print unnecessary spaces.
- Do not hard-code the result.
- If any test case passes by simply printing output without logic, marks will not be awarded.

Student submission:
#include <simplecpp>

main_program{
	int n; cin >>n;
	bool current = false;
	bool prev;
	int clus = 0;
	while (n--){
		char c; cin >>c;
		prev = current;
		if (c=='a' || c=='e' || c=='i' || c=='o' || c=='u'){
			current = true;
		}
		else{
			current = false;
		}
		if (current && !n){
			clus++;
			continue;
		}
		if (prev && !current){
			clus++;
		}
	}
	cout << clus << endl;
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variables as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Problem Description

You are building a text analyzer tool. One of its features is detecting vowel clusters in a word.

Your task is to write a program that takes a word and counts how many vowel clusters it contains.

What is a Vowel Cluster?

A vowel cluster is a group of one or more vowels (a, e, i, o, u) that appear consecutively without any consonants in between.

Examples:

- "ae" is one vowel cluster.  
- "a" is one vowel cluster.  
- "abc" has one vowel cluster: "a".  

For example, in the word "beautiful", the vowels "eau" form one vowel cluster. Later, "i" and "u" form their own clusters. Hence, the word contains 3 vowel clusters in total.

--------------------------------------------------

Input Format

- An integer n, the length of the word.  
- A word of n lowercase English letters.

--------------------------------------------------

Output Format

- Print a single integer representing the number of vowel clusters in the word.

--------------------------------------------------

Assumptions on Input

1 <= n <= 100000  

--------------------------------------------------

Note

- Do not print any extra messages such as:
  cout << "Enter a number"
  cout << "The computed answer is"
- Use cout only to print the computed final output.
- Do not print unnecessary spaces.
- Do not hard-code the result.
- If any test case passes by simply printing output without logic, marks will not be awarded.

Student submission:
#include<simplecpp>

main_program {
	int n,i,j ;
	cin >> n;
        char l,m,a ;
	i = 1;
       j=0 ;
       cin >> l;
       if(n==1) {
	       if (l== 'a' || l=='e' || l=='i' || l=='o' || l=='u'){
		       j++;}
       }

       else	while(i < n) {
		i++;
	  cin >> m;
	  if ((l== 'a' || l=='e' || l=='i' || l=='o' || l=='u')&&(m != 'a' && m!='e' && m!='i' && m!= 'o' && m!= 'u')){
		  j++ ;
	  }
	  l=a ;
	  l=m;
	  m=a;
      }
     if ((l== 'a' || l=='e' || l=='i' || l=='o' || l=='u')&&(m != 'a' && m!='e' && m!='i' && m!= 'o' && m!= 'u')){
	     j++ ;
     }
     
cout << j ;
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variables as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Problem Description

You are building a text analyzer tool. One of its features is detecting vowel clusters in a word.

Your task is to write a program that takes a word and counts how many vowel clusters it contains.

What is a Vowel Cluster?

A vowel cluster is a group of one or more vowels (a, e, i, o, u) that appear consecutively without any consonants in between.

Examples:

- "ae" is one vowel cluster.  
- "a" is one vowel cluster.  
- "abc" has one vowel cluster: "a".  

For example, in the word "beautiful", the vowels "eau" form one vowel cluster. Later, "i" and "u" form their own clusters. Hence, the word contains 3 vowel clusters in total.

--------------------------------------------------

Input Format

- An integer n, the length of the word.  
- A word of n lowercase English letters.

--------------------------------------------------

Output Format

- Print a single integer representing the number of vowel clusters in the word.

--------------------------------------------------

Assumptions on Input

1 <= n <= 100000  

--------------------------------------------------

Note

- Do not print any extra messages such as:
  cout << "Enter a number"
  cout << "The computed answer is"
- Use cout only to print the computed final output.
- Do not print unnecessary spaces.
- Do not hard-code the result.
- If any test case passes by simply printing output without logic, marks will not be awarded.

Student submission:
#include <simplecpp>
main_program{
        int N;
        char word;
        cin >> N;
        int count=0;
        for (int i=0; i<=N; i++)
                count++;
        cin>>word;
        int num=0;
        if(word=='a'||word=='e'||word=='i'||word=='o'||word=='u') num++;

        cout<<num<<endl;
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variables as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Problem Description

You are building a text analyzer tool. One of its features is detecting vowel clusters in a word.

Your task is to write a program that takes a word and counts how many vowel clusters it contains.

What is a Vowel Cluster?

A vowel cluster is a group of one or more vowels (a, e, i, o, u) that appear consecutively without any consonants in between.

Examples:

- "ae" is one vowel cluster.  
- "a" is one vowel cluster.  
- "abc" has one vowel cluster: "a".  

For example, in the word "beautiful", the vowels "eau" form one vowel cluster. Later, "i" and "u" form their own clusters. Hence, the word contains 3 vowel clusters in total.

--------------------------------------------------

Input Format

- An integer n, the length of the word.  
- A word of n lowercase English letters.

--------------------------------------------------

Output Format

- Print a single integer representing the number of vowel clusters in the word.

--------------------------------------------------

Assumptions on Input

1 <= n <= 100000  

--------------------------------------------------

Note

- Do not print any extra messages such as:
  cout << "Enter a number"
  cout << "The computed answer is"
- Use cout only to print the computed final output.
- Do not print unnecessary spaces.
- Do not hard-code the result.
- If any test case passes by simply printing output without logic, marks will not be awarded.

Student submission:
#include<simplecpp>



main_program{

int n,count,dc;
char ch;
cin>>n;
count=0;
dc=0;
for (int i=1;i<=n;i++){

cin>>ch;
if(ch=='a' || ch=='e' || ch=='i' || ch=='o'|| ch=='u' ){
if(dc==0){
count++;
dc++;

}}
else
dc=0;



}
cout<<count;



}

Grading criterion: Declaration of variables
Rating A: correctly declares the variables as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A
Problem: Problem Description

You are building a text analyzer tool. One of its features is detecting vowel clusters in a word.

Your task is to write a program that takes a word and counts how many vowel clusters it contains.

What is a Vowel Cluster?

A vowel cluster is a group of one or more vowels (a, e, i, o, u) that appear consecutively without any consonants in between.

Examples:

- "ae" is one vowel cluster.  
- "a" is one vowel cluster.  
- "abc" has one vowel cluster: "a".  

For example, in the word "beautiful", the vowels "eau" form one vowel cluster. Later, "i" and "u" form their own clusters. Hence, the word contains 3 vowel clusters in total.

--------------------------------------------------

Input Format

- An integer n, the length of the word.  
- A word of n lowercase English letters.

--------------------------------------------------

Output Format

- Print a single integer representing the number of vowel clusters in the word.

--------------------------------------------------

Assumptions on Input

1 <= n <= 100000  

--------------------------------------------------

Note

- Do not print any extra messages such as:
  cout << "Enter a number"
  cout << "The computed answer is"
- Use cout only to print the computed final output.
- Do not print unnecessary spaces.
- Do not hard-code the result.
- If any test case passes by simply printing output without logic, marks will not be awarded.

Student submission:
#include<simplecpp>
main_program{
char c1='b';
char c2;
int n,k=0;
cin >> n;
repeat(n){

        cin >> c2;

        if(!(c1=='a'||c1=='e'||c1=='i'||c1=='o'||c1=='u')){
                if(c2=='a'||c2=='e'||c2=='i'||c2=='o'||c2=='u'){
                k++;
                }
        }

        c1=c2;
}
cout << k << endl;
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variables as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A