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

//evaluates the number at (i, j)
char print(int i, int j){
    int r = 1, c = 1;
    char direc = 'd', output = 'o';
    while(i != c || j != r){
        if (r == c)
            direc = 'l';
        if (direc == 'd')
            ++r;
        if (direc == 'l')
            --c;
        if(c == 0){
            c = r+1;
            r = 1;
            direc = 'd';
            if (output == 'o') output = 'x';
            else output = 'o';
        }
    }
    return output;
}

main_program{
    int order;
    cin >> order;
    for(int j = 1; j <= order; j++){
        for(int i = 1; i <= order; i++){
            cout << print(i, 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>
void ox(int a){int k=1;while(k!=(a/2)+1){cout>>"o">>"x";};k++cout>>endl;}
void l(int n){
    int k=1;
    int p=1;
    if(n%2==0){ox(n);
    for(;p!=n+1;k++)repeat(2*k){
        cout>>"x";}
    ox(n-2*k);p++;
    repeat(2*k){cout>>"o";}
    ox(n-2*k);p++;}


}

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

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>
void print(int i,  int j, int n){
   
            if(j%2==0&&i<=j) cout<<"o";
            else cout<<"x";
        }
    

main_program{
    int i=0; 
    int j=0;
    int n;
    cin>>n;
    for(i=0;i<n;i++){
        for(j=0;j<n;j++){
          print(i,j,n);
        }
        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++){
                int l=1;
                        if(i%2==1){
                                repeat(i){
                                        cout<<"o"<<" ";
                                        l++;
                                }
                                while(l<=n){
                                        if(l%2==0)cout<<"x"<<" ";
                                        else cout<<"o" <<" ";
                                        l++;
                                }
                        }
                        else{
                                repeat(i){
                                        cout<<"x"<<" ";
                                        l++;
                                }
                                while(l<=n){
                                        if(l%2==0)cout<<"x"<<" ";
                                        else cout<<"o" <<" ";
                                        l++;
                                }
                        }
                        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;
        int l=1;
        cin >> n;

        if(n%2==0){
                while(l<=n){
                if(l%2==0){
                repeat(l){
                cout << "x";}
                repeat((n-l)/2){
                        cout << "ox";}
                cout << endl;
                l ++;
                }


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

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

cout << concentric Ls;
}
~

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{
        float n;
        if(n==2)
        cout<<" ox
                xx ";
        if(n==5)
                cout<<" oxoxo
                        xxoxo
                        oooxo
                        xxxxo
                        ooooo";
        if(n==7)
                cout<< " oxoxoxo
                         xxoxoxo
                         oooxoxo
                         xxxxoxo
                         oooooxo
                         xxxxxxo
                         ooooooo "
}

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: 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 i =1;
    int p = 2;
    int r = 0;
    int t = 2;
    if (n%2 != 0)
    {repeat((n-1)/2) {

        repeat(i){
        cout << "o";}
        repeat((n-i)/2){
            cout <<"xo";
        }i = i + 2;
        cout << endl;

        repeat(p){
            cout << "x";
        }
        cout <<"o";
        repeat((n - (p+1))/2){
            cout << "xo";}
        p= p+2;
        cout <<endl;
                     }
        repeat (n) {cout << "o";}
   }

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


}

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