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

        }
        else {
                for (int j = 1; j <=n; j++) {
                        if (j % 2 == 1){
                                repeat(j) {
                                        cout << "o";
                                }
                                repeat ((n-j)/2){
                                        cout << "xo" ;
                                }
                                cout << endl;
                        }
                        else {
                                repeat (j){
                                        cout << "x";
                                }
                                repeat ((n-j-1)/2){
                                        cout << "ox";
                                }
                                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;
        int i=1;
        if(n%2==0){
                repeat(n/2){
                        repeat(i){
                                cout << "o";
                        }
                        cout << "x";
                        repeat(n/2-1-i/2){
                                cout << "o" << "x";
                        }
                        cout << endl;
                repeat(i+1){
                        cout << "x";
                }
             
                if (n/2-2-i/2>=0){
                    cout << "o";
                        repeat(n/2-2-i/2){
                                cout << "x" << "o";
                        }
                
                        cout << "x" << endl;
                        i=i+2;
                }}}
                else{
                        repeat(n/2){
                        repeat(i){
                                cout << "o";
                        }
                        cout << "x";
                        repeat(n/2-1-i/2){
                                cout << "o" << "x";
                        }
                        cout << "o" << endl;
                        repeat(i+1){
                        cout << "x";
                }
                cout << "o" ;
                if (n/2-2-i/2>0){
                        repeat(n/2-2-i/2){
                                cout << "x" << "o";
                        }
                }
                        
                        i=i+2;}
                        repeat(n){
                                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+1;i++){
		repeat(i){
			if(i%2==0) cout << "x";
			else  cout << "o";
		}
		if(i%2==0) {
			repeat((n-i)/2) {cout << "ox";}
			if(n%2 ==1) {cout << "o";}
		}
		else{
			repeat((n-i)/2) {cout << "xo";}
			if(n%2==0) { cout << "x";}
		}
		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=0; i<n; i++) {
            if (i%2==0) {
                repeat (i+1) {
                    cout<<"o";
                }
                repeat ((n-i-1)/2) {
                    cout<<"xo";
                }
                if ((n-i-1)%2==1) cout<<"x";
                else cout<<"";
            }
            else {
                repeat (i+1) {
                    cout<<"x";
                }
                repeat ((n-i-1)/2) {
                    cout<<"ox";
                }
                if ((n-i-1)%2==1) cout<<"o";
                else cout<<"";
            }
            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, i, j;
        cin >> n;
        for(i=1;i<=n;i++){
                for(j=1;j<=n;j++){
                        if(j<=i){
                        if(i%2!=0){
                                repeat(i)
                                        cout << "0 ";
                        }
                        else{
                                repeat(i)
                                        cout << "x ";
                        }
                        j=j+i;
                        }
                        if(j>i && j<=n){
                                 if(j%2!=0){
                                cout << "0 ";
                        }
                        else{
                                cout << "x ";
                        }
                        }
                }
        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++){
        {
            if(i%2==0){
                if(n%2==0){
                repeat(i){
                    cout<<"x";
                }
                repeat((n-i)/2){
                    cout<<"ox";
                }
                
                }
                else{
                    repeat(i){
                        cout<<"x";
                    }
                    repeat((n-i-1)/2){
                        cout<<"ox";
                    }
                    cout<<"o";
                }
            }
            
            else{
                if(n%2==0){
                repeat(i){
                    cout<<"o";
                }
                repeat((n-i-1)/2){
                    cout<<"xo";
                }
                cout<<"x";
                }
                else{
                    repeat(i){
                        cout<<"o";
                    }
                    repeat((n-i)/2){
                        cout<<"xo";
                    }
                }
            }
            cout<<endl;}

        }

    }

Grading criterion: Accepting input
Rating A: correctly accepts an integer as input

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

Grading criterion: Accepting input
Rating A: correctly accepts an integer as input

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=0;
        cin >> n;
        char x='x'; char o='o';
        for(int i=1; i<=n; i++) {
                if(i%2==0) {
                        for(int k=0; k<i; k++) {
                                cout << x;
                        }
                        for(int k=0; k<(n-i)/2; k++) {
                                cout << o;
                                cout << x;
                        }
                        if(n%2!=0) {
                                cout << o;
                        }
                }
                else {
                        for(int k=0; k<i; k++) {
                                cout << o;
                        }
                        for(int k=0; k<(n-i)/2; k++) {
                                cout << x;
                                cout << o;
                        }
                        if(n%2==0) {
                                cout << x;
                        }

                }
                cout << endl;
        }
}

Grading criterion: Accepting input
Rating A: correctly accepts an integer as input

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==1){
                        repeat(i){
                                cout<<"o";}
                        int j=1;
                        repeat(n-i){
                                if(j%2==1){
                                        cout<<"x";}
                                else{
                                        cout<<"o";}
                                j++;
                        }
                }
                else{
                         repeat(i){
                                cout<<"x";}
                        int j=1;
                        repeat(n-i){
                                if(j%2==1){
                                        cout<<"o";}
                                else{
                                        cout<<"x";}
                                j++;
                        }
                }
                cout<<endl;
        }
}

Grading criterion: Accepting input
Rating A: correctly accepts an integer as input

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,x,o,i=1,p=1;
cin >> n;
for(i<=n;){
    i%2=0;
        p=x;
        i++;
}
else{
    p=o;}

        repeat(n){
                repeat(n){
                        cout<<p;
                        p++;
                        int t=1;
                }

                        p=n+t;
                        p=x;
                        t++;
                }
}

Grading criterion: Accepting input
Rating A: correctly accepts an integer as input

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 c;
c=0;
for(int row=1;row<n+1;row++){
if(c%2==0){
repeat(row){
cout<<"o";
c=1;
}
}
else{
    repeat(row){
        cout<<"x";
        c=0;
    }
    }
for(int p=0;p<n-row;p++){
    if(c%2==0){
        cout<<"o";
        c=1;
    }
    else{
    cout<<"x";
    c=0;
    }
}
if (c==0){
    c=1;
}
else{
    c=0;
}
cout<<"\n";
}
}

Grading criterion: Accepting input
Rating A: correctly accepts an integer as input

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 i=1;
        if(n%2==0) {
                repeat(n/2) {
                        repeat(i) {cout << "o";};
                                cout << "x";
                                repeat((n-i-1)/2) {cout << "ox" << endl;};
                repeat(i+1) {cout << "x";};
                        repeat((n-i-1)/2) {cout << "ox" << endl;};
                                i=i+2;
                        }
        }
}

Grading criterion: Accepting input
Rating A: correctly accepts an integer as input

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A