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

Grading criterion: Space and New line
Rating A: Correctly prints new line chracter for printing the pattern on n lines

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,k=1,z;
cin >>n;
z=n/2;
if (!(n%2==0)){
while (k<=n) {if (k%2==0) {repeat (k) {cout<<"x";}

}
        else{ repeat(k-1){cout<<"o";
        repeat(z) {cout<<"o"<<"x"}
        cout <<"o"<<endl;
        }}
k++;
z--;








}}

Grading criterion: Space and New line
Rating A: Correctly prints new line chracter for printing the pattern on n lines

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: B
Problem: Write a program to accept an integer n and print an n x n square grid filled with alternating concentric L-shaped patterns using the characters 'o' and 'x'.

The pattern always starts with the character 'o'.

The next row and column are filled with 'x', forming an L shape flipped on the vertical axis.

Then again with 'o', alternating until the entire grid is filled.

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

Print the n x n pattern of concentric L shapes using 'o' and 'x'.


Note

- Do not print any extra messages such as:
  cout << "Enter a number"
  cout << "The computed answer is"
- Use cout only to print the computed final output.
- Do not print unnecessary spaces.
- Do not hard-code the output.
- If any test case passes by simply printing with cout and without logic, marks will not be awarded.

Student submission:
#include <simplecpp>
main_program
{
        int n;cin>>n;char ichar;
       if(n%2!=0)
       { for(int i=1;i<=n;i++)
        {
                if(i%2==0)
                        ichar='x';
                else
                        ichar='o';

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

{ for(int i=1;i<=n;i++)
        {
                if(i%2==0)
                        ichar='x';
                else
                        ichar='o';

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

Grading criterion: Space and New line
Rating A: Correctly prints new line chracter for printing the pattern on n lines

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

Grading criterion: Space and New line
Rating A: Correctly prints new line chracter for printing the pattern on n lines

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 temp= a;
        a=b;
        b=temp;
}
main_program{
        int n,i=1;
        cin>>n;
        char A='o',B='x';
        repeat(n){
                repeat(i){
                        cout<<A;}
                swap(A,B);
                repeat(n-i){
                        cout << A;
                        swap(A,B);
                }
                if ((n-i)%2!=0) swap(A,B);
                i=i+1;
                cout<<endl;
        }}

Grading criterion: Space and New line
Rating A: Correctly prints new line chracter for printing the pattern on n lines

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){
                while(i<=n){

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

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

}

Grading criterion: Space and New line
Rating A: Correctly prints new line chracter for printing the pattern on n lines

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: B
Problem: Write a program to accept an integer n and print an n x n square grid filled with alternating concentric L-shaped patterns using the characters 'o' and 'x'.

The pattern always starts with the character 'o'.

The next row and column are filled with 'x', forming an L shape flipped on the vertical axis.

Then again with 'o', alternating until the entire grid is filled.

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

Print the n x n pattern of concentric L shapes using 'o' and 'x'.


Note

- Do not print any extra messages such as:
  cout << "Enter a number"
  cout << "The computed answer is"
- Use cout only to print the computed final output.
- Do not print unnecessary spaces.
- Do not hard-code the output.
- If any test case passes by simply printing with cout and without logic, marks will not be awarded.

Student submission:
#include<simplecpp>
void print(int n){
    for(int i=1;i<=n;i++){
        if (i%2==0){
            for(int j=1;j<=i;j++){
                cout<<"x";
            }
            for(int k=1;k<=n-i;k++){
                if(k%2==0){
                    cout<<"x";
                }
                else cout<<"o";
            }
        }
        else {
            for(int a=1;a<=i;a++){
                cout<<"o";
            }
            for(int b=1;b<=n-i;b++){
                if (b%2==1){
                    cout<<"x";
                }
                else cout<<"o";
                }
        }
        cout<<endl;
    }
}
main_program{
    int n;
    cin>>n;
    print(n);
}

Grading criterion: Space and New line
Rating A: Correctly prints new line chracter for printing the pattern on n lines

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

    }
}
}

Grading criterion: Space and New line
Rating A: Correctly prints new line chracter for printing the pattern on n lines

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

Grading criterion: Space and New line
Rating A: Correctly prints new line chracter for printing the pattern on n lines

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,l;
cin>>n;
char op;
for(i=1; i<=n; i++)
{
repeat(i)
{
if(i%2==1)
{
cout<<"o";
op='o';
}
else
{
cout<<"x";
op='x';
}
}
for(l=0; l<n-i; l++)
{
if(l==(n-i-1))
{
if(op=='o')
{
cout<< "x"<<endl;
}
if(op=='x')
{
cout<< "o"<<endl;
}
}
else
{
if(op=='o')
{
cout<< "x";
op='x';
}
else
{
if(op=='x')
{
cout<<"o";
op='o';
}
}
}
}
}
}

Grading criterion: Space and New line
Rating A: Correctly prints new line chracter for printing the pattern on n lines

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

Grading criterion: Space and New line
Rating A: Correctly prints new line chracter for printing the pattern on n lines

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



}
}

Grading criterion: Space and New line
Rating A: Correctly prints new line chracter for printing the pattern on n lines

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


        } }cout << endl ;}}

Grading criterion: Space and New line
Rating A: Correctly prints new line chracter for printing the pattern on n lines

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A