CodeGraderBench/CodeGraderBench huggingface dataset:
Problem: Write a program to accept an integer n and print an n x n square grid filled with alternating concentric L-shaped patterns using the characters 'o' and 'x'.

The pattern always starts with the character 'o'.

The next row and column are filled with 'x', forming an L shape flipped on the vertical axis.

Then again with 'o', alternating until the entire grid is filled.

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

Print the n x n pattern of concentric L shapes using 'o' and 'x'.


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 output.
- If any test case passes by simply printing with cout and without logic, marks will not be awarded.

Student submission:
#include<simplecpp>
main_program{
        int n;
        cin>>n;
        repeat(n/2){
                for(int i=0;i<n;i++){

                        if(n%2==0){
                                repeat(2*i){
                                        cout<<"x";
                                }
                        }
                        else {
                                repeat(2*i){
                                        cout<<"o";
                                }
                        }
                        repeat((n-i)/2){
                                cout<<"o"<<"x";
                        }
                    
                    cout<<endl;
                }
        }
}

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

Assigned grade: C
Problem: Write a program to accept an integer n and print an n x n square grid filled with alternating concentric L-shaped patterns using the characters 'o' and 'x'.

The pattern always starts with the character 'o'.

The next row and column are filled with 'x', forming an L shape flipped on the vertical axis.

Then again with 'o', alternating until the entire grid is filled.

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

Print the n x n pattern of concentric L shapes using 'o' and 'x'.


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 output.
- If any test case passes by simply printing with cout and without logic, marks will not be awarded.

Student submission:
#include<simplecpp>
main_program{
	int n;
	cin >> n;
	int counteven = 2;
	int countodd = 1;
	for(int i=1; i<=n; i++){
		if(i%2 == 0){
			repeat(counteven){
				cout <<"x";
			}
			counteven=counteven+2;			
			if(n%2==0){			
			    repeat((n-i)/2){
				    cout<<"ox";
			    }
            }
			if(n%2==1){
				repeat((n-i)/2){
				cout<<"ox";
			    }
			cout<<"o";}		
		}
		if(i%2 == 1 ){
			repeat(countodd){
				cout<<"o";
			}
			countodd=countodd+2;
			if(i!=n){
				cout<<"x";
            }			
			if(n%2==0){			
			    repeat((n-i-1)/2){
				    cout<<"ox";
			    }
			}
			if(n%2==1 && i!=n){
				repeat((n-i-1)/2){
				cout<<"ox";
			    }
			cout<<"o";
			}		
		}
		cout<<endl;
	}
	
}

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

Assigned grade: A
Problem: Write a program to accept an integer n and print an n x n square grid filled with alternating concentric L-shaped patterns using the characters 'o' and 'x'.

The pattern always starts with the character 'o'.

The next row and column are filled with 'x', forming an L shape flipped on the vertical axis.

Then again with 'o', alternating until the entire grid is filled.

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

Print the n x n pattern of concentric L shapes using 'o' and 'x'.


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 output.
- If any test case passes by simply printing with cout and without logic, marks will not be awarded.

Student submission:
#include<simplecpp>
main_program{
    int n;
    cin >> n; 
    while (true){ 
        while(ture){
            repeat(n) 
            cout << 0 ;
            i++
        }
        cout << 0 endl
        cout << 0 endl ;
                    } 
    }
}

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

Assigned grade: D
Problem: Write a program to accept an integer n and print an n x n square grid filled with alternating concentric L-shaped patterns using the characters 'o' and 'x'.

The pattern always starts with the character 'o'.

The next row and column are filled with 'x', forming an L shape flipped on the vertical axis.

Then again with 'o', alternating until the entire grid is filled.

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

Print the n x n pattern of concentric L shapes using 'o' and 'x'.


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 output.
- If any test case passes by simply printing with cout and without logic, marks will not be awarded.

Student submission:
#include<simplecpp>
main_program{
        int i,j,n;
        cin >> n;
for(i=1,i<=n,i++){
        for(j=1,j<=n,j++){
                if(i%2==0 && j%2==0) cout << "x";
                else if(i%2==0 && j%2!=0) cout << "o";
                else if(i%2!=0 && j%2==0) cout << "x";
                else cout << "o";
        }
}
}

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

Assigned grade: D
Problem: Write a program to accept an integer n and print an n x n square grid filled with alternating concentric L-shaped patterns using the characters 'o' and 'x'.

The pattern always starts with the character 'o'.

The next row and column are filled with 'x', forming an L shape flipped on the vertical axis.

Then again with 'o', alternating until the entire grid is filled.

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

Print the n x n pattern of concentric L shapes using 'o' and 'x'.


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 output.
- If any test case passes by simply printing with cout and without logic, marks will not be awarded.

Student submission:
#include<simplecpp>
main_program
{
   int n,i=1,j=1;
   cin >> n;
   
   
     for(j=1;j<=n;j=j+2)
     {       
        repeat(j)
        {       
          cout << "o";          
        } 
        
        repeat((n-i)/2)
        {
          cout << "x" << "o";   
        }

        if((n-i)%2!=0)
          cout << "x";  

        cout << endl;


     }

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

Assigned grade: B
Problem: Write a program to accept an integer n and print an n x n square grid filled with alternating concentric L-shaped patterns using the characters 'o' and 'x'.

The pattern always starts with the character 'o'.

The next row and column are filled with 'x', forming an L shape flipped on the vertical axis.

Then again with 'o', alternating until the entire grid is filled.

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

Print the n x n pattern of concentric L shapes using 'o' and 'x'.


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 output.
- If any test case passes by simply printing with cout and without logic, marks will not be awarded.

Student submission:
#include<simplecpp>
main_program{
    int n;
    cin >> n;
    int x=1;
    while(x<=n){
        int y=1;
        while(y<=n){
            if(x>=y){
                if(x%2==0){
                    cout << "x";
                }
                else cout << "o";
            }
            if(y>x){
                if(y%2==0){
                    cout << "x";
                }
                else cout << "o";
            }
            y++;
        }
        cout << endl;
        x++;
    }
}

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

Assigned grade: A
Problem: Write a program to accept an integer n and print an n x n square grid filled with alternating concentric L-shaped patterns using the characters 'o' and 'x'.

The pattern always starts with the character 'o'.

The next row and column are filled with 'x', forming an L shape flipped on the vertical axis.

Then again with 'o', alternating until the entire grid is filled.

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

Print the n x n pattern of concentric L shapes using 'o' and 'x'.


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 output.
- If any test case passes by simply printing with cout and without logic, marks will not be awarded.

Student submission:
#include<simplecpp>
main_program{
    int n;
    cin>>n;
    int k=1;
    while(k<=n) {
        if (k%2==1){
            int p=1;
            while(p<=k){
                cout<<"o";
                p++;}
                while(1){
                    if(p>n) break;
                    if (p%2==1) cout<<"o";
                    else cout<<"x";
                    p++;
                }}
        else{
            int p=1;
            while(p<=k){
                cout<<"x";
                p++;}
                while(1){
                    if(p>n) break;
                    if (p%2==1) cout<<"o";
                    else cout<<"x";
                    p++;
                }}        
        k++;
        cout<<endl;        
    }}

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

Assigned grade: A
Problem: Write a program to accept an integer n and print an n x n square grid filled with alternating concentric L-shaped patterns using the characters 'o' and 'x'.

The pattern always starts with the character 'o'.

The next row and column are filled with 'x', forming an L shape flipped on the vertical axis.

Then again with 'o', alternating until the entire grid is filled.

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

Print the n x n pattern of concentric L shapes using 'o' and 'x'.


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 output.
- If any test case passes by simply printing with cout and without logic, marks will not be awarded.

Student submission:
#include<simplecpp>
main_program{
int n;
char x,y;
cin>>n;
x='0';
y='x';
int i;
char temp;
i=1;
  repeat(n){
          repeat(i){
                  cout<<x;
          }
          if((int((n-i)/2))%2==0){
                  repeat((n-i)/2){
                          cout<<y<<x;
                          cout<<endl;
                  }}
          else{
                  repeat((n-i/2))
          {cout<<y<<x;}
                  cout<<y;
                  cout<<endl;
          }
          temp=y;
          y=x;
          x=temp;
          i=i+1;}

}

~                                                                                                                                                                                                           
~

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

Assigned grade: C
Problem: Write a program to accept an integer n and print an n x n square grid filled with alternating concentric L-shaped patterns using the characters 'o' and 'x'.

The pattern always starts with the character 'o'.

The next row and column are filled with 'x', forming an L shape flipped on the vertical axis.

Then again with 'o', alternating until the entire grid is filled.

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

Print the n x n pattern of concentric L shapes using 'o' and 'x'.


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 output.
- If any test case passes by simply printing with cout and without logic, marks will not be awarded.

Student submission:
#include<simplecpp>
void x(){cout << "x";}
void p(){cout << "o";}
main_program{
             int n,m,l,k,y;
             cin >> n;
             m=n;
             l=1;
             k=m;
             y=0;
             while(k!=0){int o=l;
                         int z=l%2;
                         n=m;

                                     if(z==0){repeat(l){x();};
                                                n=n-1;}
                                     else{repeat(l){p();};n=n-1;}
                          while(n!=0){if(z==0){if(y%2==0){p();}
                                               else{x();}

                                              }
                                      else{if(y%2==0){x();}
                                           else{p();}
                                          }
                                      y=y+1;
                                      n=n-1;
                                     }
                         cout << endl;
                         l=l+1;
                         k=k-1;
                         y=0;
                        }
            }

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

Assigned grade: C
Problem: Write a program to accept an integer n and print an n x n square grid filled with alternating concentric L-shaped patterns using the characters 'o' and 'x'.

The pattern always starts with the character 'o'.

The next row and column are filled with 'x', forming an L shape flipped on the vertical axis.

Then again with 'o', alternating until the entire grid is filled.

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

Print the n x n pattern of concentric L shapes using 'o' and 'x'.


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 output.
- If any test case passes by simply printing with cout and without logic, marks will not be awarded.

Student submission:
#include<simplecpp>
main_program {
        int n, count=1;
        cin>>n;
        char a='o', b='x', c, d, e;
        for(int i=1; i<=n; i++) {
                for(int j=1; j<=count; j++) {
                        cout<<a;
                }
                d=a;
                e=b;
                for(int k=1; k<=n-count; k++) {
                        cout<<e;
                        c=e;
                        e=d;
                        d=c;
                }
                cout<<endl;
                c=a;
                a=b;
                b=c;
                count=count+1;
        }
}

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

Assigned grade: A
Problem: Write a program to accept an integer n and print an n x n square grid filled with alternating concentric L-shaped patterns using the characters 'o' and 'x'.

The pattern always starts with the character 'o'.

The next row and column are filled with 'x', forming an L shape flipped on the vertical axis.

Then again with 'o', alternating until the entire grid is filled.

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

Print the n x n pattern of concentric L shapes using 'o' and 'x'.


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 output.
- If any test case passes by simply printing with cout and without logic, marks will not be awarded.

Student submission:
#include <simplecpp>

main_program{

        int n;
        cin >> n;

        for(int i=1; i<=n; i++) {

                if (i%2!=0) {
                        for(int j=1; j<=i; j++) {
                        cout << "o";

                        }

                        if (n%2==0) {
                                cout << "x";
                                for(int k=1; k<= ((n-i-1)/2); k++) {
                                        cout << "o"<< "x";
                                }
                        }

                        else {
                                for(int l=1; l<= ((n-i)/2); l++) {
                                        cout << "x"<< "o";
                                }
                        }
                }

                if (i%2==0) {
                        for(int m=1; m<=i; m++) {
                                cout << "x";
                        }

                        if (n%2==0) {
                                for(int p=1; p<=((n-i)/2); p++) {
                                        cout << "o"<< "x";
                                }
                        }
                        if (n%2!=0) {
                                cout << "o";
                                for(int q=1; q<=((n-i-1)/2); q++) {
                                    cout << "x" << "o";

                        }
                        }
                }
                cout << endl;

        }
}

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

Assigned grade: A
Problem: Write a program to accept an integer n and print an n x n square grid filled with alternating concentric L-shaped patterns using the characters 'o' and 'x'.

The pattern always starts with the character 'o'.

The next row and column are filled with 'x', forming an L shape flipped on the vertical axis.

Then again with 'o', alternating until the entire grid is filled.

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

Print the n x n pattern of concentric L shapes using 'o' and 'x'.


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 output.
- If any test case passes by simply printing with cout and without logic, marks will not be awarded.

Student submission:
#include <simplecpp>

main_program{
    int n;
    cin >> n;
    for(int row = 1; row<=n; row++){
        for(int column = 1; column<=n; column++){
            if(row%2 == 1){
                if(column>row && column%2==0){
                    cout << "x";
                }
                else{
                    cout << "o";
                }
            }
            else{
                if(column<=row || column%2 == 0){
                    cout << "x";
                }
                else{
                    cout << "o";
                }
            }
        }
        cout << endl;
    }
}

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

Assigned grade: A