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

Grading criterion: Loops through the number of columns
Rating A: Correctly iterates over the loop for the number of columns
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 a=1;a<=n;a++){
                if(a%2==1){
                        for(int b=1;b<=a;b++){
                                cout << 'o';
                        }
                        for(int b=a+1;b<=n;b++){
                                if(b%2==0){
                                        cout <<'x';
                                }
                                else{
                                        cout <<'o';}}}
                else{
                        for(int b=1;b<=a;b++){
                                cout << 'x';
                        }
                        for(int b=a+1;b<=n;b++){
                                if(b%2==0){
                                        cout <<'x';
                                }
                                else{
                                        cout <<'o';}}}
                cout<<endl;
        }}

Grading criterion: Loops through the number of columns
Rating A: Correctly iterates over the loop for the number of columns
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, k=1;
	cin>>n;
	for(i=1; i<=n; i++)
	{
		for(j=0; j<i; j++)
		{
			if(k>0)
			{
				cout<<"o";
			}
			else
			{
				cout<<"x";
			}
		}
		k=-k;
		for(j=0; j<n-i; j++)
		{
			if(k>0)
			{
				cout<<"o";
				k=-k;
			}
			else
			{
				cout<<"x";
				k=-k;
			}
		}
		cout<<endl;
		if(i%2==1)
			k=-1;
		else
			k=1;
	}
}

Grading criterion: Loops through the number of columns
Rating A: Correctly iterates over the loop for the number of columns
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";}
        repeat((n-i)/2){cout<<"ox";}
        if(n%2==1)cout<<"o";
        cout<<endl;}
        else {repeat(i){cout<<"o";}
        repeat((n-i)/2){cout<<"xo";}
        if(n%2==0)cout<<"x";
        cout<<endl;}
       
    }
}

Grading criterion: Loops through the number of columns
Rating A: Correctly iterates over the loop for the number of columns
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++){
                for (int j = 1 ; j < n+1 ; j++){
                        if(j<i+1){
                                if(i%2 == 0) cout << "x";
                                else cout << "o";
                        }       
                        else {
                                if (j%2 == 0) cout << "x";
                                else cout << "o";
                        }               
                }       
                cout << endl;
        }       
}

Grading criterion: Loops through the number of columns
Rating A: Correctly iterates over the loop for the number of columns
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 (i%2!=0){
				if (j%2==0 && j>i) cout<<"x";
				else cout<<"o";
			}
			else{
				if ((j<=i)||(j%2==0)) cout<<"x";
				else cout<<"o";
			}
		}
		cout<<endl;
	}
}

Grading criterion: Loops through the number of columns
Rating A: Correctly iterates over the loop for the number of columns
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,p,i=1;
cin>>n;
if(n%2 == 0){
        while(i<=n){
        p=i;
if(i%2 == 0){
        repeat(p){
        cout<<"x";
        }
        repeat((n-p)/2){
        cout<<"o"<<"x";
        }
cout<<endl;
}
else{
repeat(p-1){
cout<<"o";
}
repeat((n-p+1)/2){
cout<<"o"<<"x";
}
cout<<endl;
}
i++;
}
}
else{
        while(i<=n){
        p=i;
if(i%2 == 0){
        repeat(p){
        cout<<"x";
        }
        repeat((n-p)/2){
        cout<<"o"<<"x";
        }
cout<<"o"<<endl;
}
else{
repeat(p-1){
cout<<"o";
}
repeat((n-p+1)/2){
cout<<"o"<<"x";
}
cout<<"o"<<endl;
}
i++;
}
}
}

Grading criterion: Loops through the number of columns
Rating A: Correctly iterates over the loop for the number of columns
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++){
                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: Loops through the number of columns
Rating A: Correctly iterates over the loop for the number of columns
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: Loops through the number of columns
Rating A: Correctly iterates over the loop for the number of columns
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;
    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: Loops through the number of columns
Rating A: Correctly iterates over the loop for the number of columns
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: Loops through the number of columns
Rating A: Correctly iterates over the loop for the number of columns
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;
	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: Loops through the number of columns
Rating A: Correctly iterates over the loop for the number of columns
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;
	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: Loops through the number of columns
Rating A: Correctly iterates over the loop for the number of columns
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: Loops through the number of columns
Rating A: Correctly iterates over the loop for the number of columns
Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: C