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

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

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++) // i is row number 
	{
		for ( int j=1; j<=n; j++ ) //j is column number
		{
			if (i%2!=0)
			{ 
				if (j<=i)
				{ cout<<"o"; }
				else 
				{	
					if (j%2!=0)
					{ cout<<"o"; }
					else 
					{ cout<<"x"; }
				}

			}
			else 
			{ 
				if(j<=i)		
				{ cout<<"x"; }
				else
				{	
                                        if (j%2!=0)
                                        { cout<<"o"; }
                                        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, i=1, j=1;
        cin >> n;
        while(j<=n) {
                if (i>=j) {
                        if (i%2==0) {
                                cout << 'x';
                        }
                        else {
                                cout << 'o';
                        }
                }
                else {
                        if (j%2==0) {
                                cout << 'x';
                        }
                        else {
                                cout << 'o';
                        }
                }

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

        char a='o';
        char b='x';
        char c='c';
        int y=1;

        repeat(n){


                repeat(y){
                        cout<<a;}
                if((n-y)%2==1){
                        repeat((n-y)/2){
                                cout<<b<<a;
                        } cout<< b<<endl;
                }else{repeat((n-y)/2){
                        cout<<b<<a;
                }
                cout<<endl;
                }
                y++;
                c=a;
                a=b;
                b=c;

                }
        }

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