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;

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

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
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;
        repeat(n/2)
        cout<<"o"<<"x";

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
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 l=1;l<=n;l++){
        if(l%2!=0){repeat(l){cout<<"o";}
        for(int k=l+1;k<=n;k++){ if (k%2==0) cout<<"x";
                                    else cout<<"o";} cout<<endl;}
        else{repeat(l){cout<<"x";}
        for(int k=l+1;k<=n;k++){if (k%2==0)cout<<"x";
                                 else cout<<"o";}cout<<endl;}                            
    }
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
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 j=1;j<=n;j++) {
        int k=n;
if (j%2!=0) {
repeat (j) {
cout << 'o';
}
if(k%2!=0) {
repeat((k-j)/2) {
cout << "xo" << endl;
}
else {
cout << 'x';
repeat((k-j-1)/2) {
cout << "ox" << endl;
}
}
}
}
else repeat(j) {
cout << 'x';
if(k%2!=0) {
cout << 'o';
repeat((k-j-1)/2) {
cout << "xo" << endl;
}
else {
repeat((k-j)/2) {
cout << "ox" << endl;
}
}
}
}
}
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
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 r=0;
	int i=1;
	while(i<n){
	if(n%2==0){
		repeat((n-r)/2){
			cout<<"ox"<<endl;
		}
	}
	else{
		repeat((n-(r+1))/2){
			cout<<"ox";
		}
			cout<<"o"<<endl;
		
	}
	r++;
	cout<<x;
	if(n%2=0){
		repeat((n-(r+1))/2){
			cout<<"xo";
		}
		cout<<x<<endl;
	}
	else{
		repeat((n-r)/2){
			cout<<"xo"<<endl;
		}

	}
	i++;
	}
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
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 col=0;
	char start='o';
	char foll='x';
	while (col<n){
		for (int i=0;i<col+1;i++){
			cout<<start;
		}
		for(int u=0;u<n-col-1;u++){
			if((u%2)==0){
				cout<<foll;
			}
			else{
				cout<<start;
			}
		}
		col=col+1;
		char f=start;
		start=foll;
		foll=f;
		cout<<endl;
	}
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
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;
i,j >> i=row, j=column
if (i==j==odd)
cout<<o
if (i==j==even)
cout<<x
if (i==j==odd and i<i j<j)
cout<<o
if (i==j==even and i<i j<j)
cout<<x
cout << n*n square grid

}

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
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,i=2;
        cin >> n;

        {if(n%2==0){
                repeat(n/2)
                        {cout << "ox";}
                cout << endl;}
        else
                {repeat(n/2)
                        {cout << "ox";}
                        cout << "o" << endl;}}

        while(i<=n){
                if(i%2==0)
                        {repeat(i)
                                {cout << "x";}

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

                else
                        {repeat(i-1)
                                {cout << "o";}

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

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
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;
    if (n==2){ cout << 'o'<< 'x' << endl;
    cout << 'x'<< 'x '; }
    if (n == 5){ repeat(2) {cout << 'o'<<'x'} cout << 'o' << endl;
    cout << 'x'<< 'x'<<'o'<<'x'<<'o'<< endl;
    cout << "x"
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
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)
                {
                        repeat(i) {cout<<"x";}
                        for(int k=(n-i);k>0;k--)
                        {
                                if(n%2==0)
                                {
                                        if(k%2==0) cout<<"o";
                                        else cout<<"x";
                                }
                                else
                                {
                                        if(k%2==0) cout<<"x";
                                        else cout<<"o";
                                }

                        }

                }
                else
                {
                        repeat(i) {cout<<"o";}
                        for(int k=(n-i);k>0;k--)
                        {
                                if(n%2==0)
                                {
                                        if(k%2==0) cout<<"o";
                                        else cout<<"x";
                                }
                                else
                                {
                                        if(k%2==0) cout<<"x";
                                        else cout<<"o";
                                }

                        }
                }
                cout<<endl;
        }
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
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++){
        for (int j=1;j<=n;j++){
            if(j<=i){
                (i%2==0)?cout<<'x' : cout<<'o';
            }
            else{
                (j%2==0)? cout<<'x':cout<<'o';
            }
        }
        cout<<endl;
    }
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
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;
	if (n%2==0){
		repeat(n/2){
			cout<<"o"<<"x"<<endl;
			repeat(4*n+1){
				cout<<"x"<<"o"<<endl;
		}
	else
		repeat((2*n+1)/2){
			cout<<"o"<<"x"<<endl;
			repeat(4*n-3){
				cout<<"x"<<"o"<<endl;
			}

	}
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
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;
        int count=1;
        cin>>n;
        int m=n;
        int a=1;
        if(n%2!=0){
        while(n/2!=0){
        repeat(((m-1)/2)){
                cout<<"o"<<"x";}
        repeat(a){
        cout<<"o";}
        cout<<endl;
        count++;
        m=m-2;
        a++;
        repeat(count){
                cout<<"x";
        }
        repeat((m-1)/2){
        cout<<"o"<<"x";}
        repeat(a){
        cout<<"o"<<endl;
        n--;}
        }

        }
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
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>

int concentric(){
        int n; char x = x; char o = o;
        cin >> n;
        for(int i = 0;i<=n;i++){
                char a; char b;
                repeat(n){
                        a=i*"o";
                        b=i*"x";
                        cout << a << b;
                }
        }
}
main_program{
        return concentric(n);
}

// so basically in this code, for easier understanding, we have to print the 1st type ie "o" equal to the row number, 2nd row means 2 o and then alternate char, this will evetually lead to a formation of L type output of o and x;

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A