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>

main_program{
	int n, x=0, vcluster=0;
	char vow;
	cin >>  n;
	for(int i=0; i<n; i++){
		cin >>  vow;
		if (vow =='a' || vow == 'e' || vow == 'i' || vow == 'o' || vow == 'u') x=1;
		else if(x==1){
			vcluster++;
			x=0;
		}
	}
	cout << vcluster << endl;
}

Grading criterion: Loop
Rating A: Correctly iterates the loop N times

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>
bool isvowel( char a) {
	
	int n = int(a);
	if ( n==97||n==101||n==105||n==111||n==117) {
		return true ;
	}
	else {
		return false ;
	}
}
main_program {
	int n, c =0 ;
	cin>>n;
	char a1, a2;
	cin>>a2;
	for ( int i = 1 ; i<n; i++) {
		a1 = a2 ;
		cin>>a2 ;
		if ( isvowel(a1) && isvowel(a2) == false) {
			c++;
		}
	}
	cout<<c<<endl;
}

Grading criterion: Loop
Rating A: Correctly iterates the loop N times

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,p=1,q=1,k=0;
    cin >> n;
    for(int i=1; i<=n; i++){
        char a;
        cin >> a;
        p=q;
        if(a=='a'||a=='e'||a=='i'||a=='o'||a=='u'){
            q=0;
        }
        else q=1;
        if(i==n){
            if(q==0)k++;
        }
       
            if((q-p) == 1){k++;}
        
    }
    cout << k;
}

Grading criterion: Loop
Rating A: Correctly iterates the loop N times

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>
bool checkVowel(char n){
    if (n == 'a' or n == 'e' or n == 'i' or n == 'o' or n == 'u')
    return True;
}
main_program{
    long n;
    cin >>n;
    char a;
    bool temp = False;
    int count = 0;
    while(n>0){
        cin >> a;
        if (checkVowel(a)==True){
                temp = True;
                continue;
        }
        else if (temp==True){
            count++;
        }
        n--;
    }
    cout << count-2;
}

Grading criterion: Loop
Rating A: Correctly iterates the loop N times

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{

         double n,b,count=0;
         char a,temp;
         cin>>n;
         cin>>a;
         b=1;
    while(b<n){

            temp=a;
            cin>>a;
           if((temp=='a'||temp=='e'||temp=='i'||temp=='o'||temp=='u')&&a!='a'&&a!='e'&&a!='i'&&a!='o'&&a!='u')count=count+1;
   b=b+1;
    }
    cout<<count<<endl;
 }

Grading criterion: Loop
Rating A: Correctly iterates the loop N times

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=0, i=0;
cin>>n;
char c, prev='b';
while (i<n) {cin>>c;
         if (!(prev=='a' || prev=='e' || prev=='i' ||prev=='o' ||prev=='u'))
         {if (c=='a' || c=='e' || c=='i' ||c=='o' ||c=='u') count++;}
prev=c;
i++;}
cout <<count;
}

Grading criterion: Loop
Rating A: Correctly iterates the loop N times

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 n1;int count;char c1;
        cin>>n;
        int i;
      while(n1<n)
      {
              char c;
                      cin>>c;n1++;
                    if(!(c=='a'||c=='e'||c=='i'||c=='o'||c=='u'))
                          continue;
                    else
                      while(n1<=n)
                      {
                              cin>>c1;n1++;
                         if(c1=='a'||c1=='e'||c1=='i'||c1=='o'||c1=='u')
                            continue;
                         else
                         {
                                 count++;
                                 break;
                         }
   }

              }
              if(c1=='a'||c1=='e'||c1=='i'||c1=='o'||c1=='u')
                            count++;
         
              cout<<count;
               }

Grading criterion: Loop
Rating A: Correctly iterates the loop N times

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: B
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>
bool check(char inp2){
    if(inp2 == 'a'||inp2 == 'e'||inp2 == 'i'||inp2 == 'o'||inp2 == 'u') return true;
    else return false;
}
main_program{
    int n, out = 0;
    char inp1,inp2;
    cin >> n;
    cin >> inp1 >> inp2;
    for(int i = 0; i < n-1; i++){
        if(check(inp1)){
            if(!(check(inp2))){
                out++;
            }
        }
        if(i == n-2){
            if(check(inp2)){
                out++;
            }            
        }
        inp1 = inp2;
        cin >> inp2;
    }
    cout << out;
}

Grading criterion: Loop
Rating A: Correctly iterates the loop N times

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: C
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 vowel(char ct){
        int a=0;
        if(ct=='a') a=1;
        if(ct=='e') a=1;
        if(ct=='i') a=1;
       if (ct=='o') a=1;
      if (ct=='u') a=1;
return a;
}main_program{
        int n;
        cin>>n;
        int a,b,i=0;
                char c;
                cin>> c;
                a = vowel(c);
                b=a;
        repeat(n-1){
                cin>> c;
                 a= vowel(c);
                if ((b-a)!=0) i=i+1;
                b=a;
        }
        cout<<i<<endl;
}

Grading criterion: Loop
Rating A: Correctly iterates the loop N times

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,p=0,y=0;
    char x;
    cin>>n;
    repeat(n){
        cin>>x;
        if((x=='a'||x=='e'||x=='i'||x=='o'||x=='u')&&y==0){
            continue;
        }
        else if((x=='a'||x=='e'||x=='i'||x=='o'||x=='u')&&y==1){
            p=p+1;
            y=0;
        }
        else{
            continue;
        }
}
cout<<p;
}

Grading criterion: Loop
Rating A: Correctly iterates the loop N times

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=0;
    short prev=0;
    cin>>n;
    for (int i=0; i<n; i++){
        char c;
        cin>>c;
        if (c=='a' || c=='e' || c=='i' || c=='o' || c=='u'){
            if (prev==0) {
                count++;
                prev=1;
            }
        }
        else prev=0;
    }
    cout<<count;
}

Grading criterion: Loop
Rating A: Correctly iterates the loop N times

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, count, ans;
cin>>n;
char c;
ans=0;
count=0;
i=0;
for(i=0; i<n; i++)
{
cin>>c;
if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u')
{
count=count+1;
}
else
{
if(count>0)
{
        ans=ans+1;
count=0;
}
}
}
cout<<ans<<endl;
}

Grading criterion: Loop
Rating A: Correctly iterates the loop N times

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A