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 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: 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++){
                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: 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;
        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: 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;
        ---
---
--------

cout << concentric Ls;
}
~

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{
        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: 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 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: 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;
cout<< [n][n]<<endl;
for()
[1][1]==o;
[1][2]==x;
[2][1]==o;
[2][2]==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 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: 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 x=0 ,n ;
 cin >> n ;
 if(n%2 == 0 ){repeat(n/2){if(x%2==0) {repeat(x){cout << "o";}repeat((n-x)/2) { cout <<"o"<<"x";} cout << endl ; x=x+1 ;}
                         if(x%2==1) { repeat(x+1){cout << "x";} repeat((n-x-1)/2){ cout <<"o"<<"x";} cout << endl ; x =x+1 ;} } }
     x=0 ;             
  if(n%2 == 1){repeat((n-1)/2){if(x%2==0) {repeat(x){cout << "o";}repeat((n-x-1)/2) { cout <<"o"<<"x";} cout<<"o" ; cout << endl ; x=x+1 ;}
                         if(x%2==1) { repeat(x+1){cout << "x";} repeat((n-x-2)/2){ cout <<"o"<<"x";} cout<< "o" ; cout << endl ; x =x+1 ;} }
                    repeat(n){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;
        char ch1='0',ch2='x';
        int k=1,l=n;
        if(l%2!=0){
                int m=(l-1)/2;
        while(m>=0){
                if(m==0){
                        repeat(k){
                                cout<<ch1;
                        }
                        cout<<endl;
                        break;
                }
                else{
                repeat(k){
                        cout<<ch1;
                }
                repeat(m){
                        cout<<ch2<<ch1;
                }
                cout<<endl;
                repeat(k){
                        cout<<ch2;
                }
                repeat(m){
                        cout<<ch2<<ch1;
                }
                cout<<endl;
                k=k+2;
                m=m-1;
                }
        }
        }
        else{
        int p=2,a=n/2;
        repeat(a){
                cout<<ch1<<ch2;
        }
        cout<<endl;
        a--;
while(a>=0){
                if(a==0){
                        repeat(p){
                                cout<<ch2;
                        }
                        cout<<endl;
                        break;
                }
                else{
        repeat(p){
                cout<<ch2;
        }
        repeat(a){
                cout<<ch1<<ch2;
        }
        cout<<endl;
        repeat(p){
                cout<<ch1;
        }
        repeat(a){
                cout<<ch1<<ch2;
        }
        cout<<endl;
        a--;
        p=p+2;
                }
        }
        }

}

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,r,j;
    r=1;
    j=1;
cin>>n;
for(r=1;r<=n;r++){
    if(r%2!=0){
        int i=1;
        for(i=1;i<=r;i++){cout<<"o";}
     j=r;
     while(j<n){
        cout<<"x";
        j++;
        if(j==n){break;}
        cout<<"o";
        j++;
     }}
     if(r%2==0){ int i=1;
        for(i=1;i<=r;i++){cout<<"x";}
     j=r;
     while(j<n){
        cout<<"o";
        j++;
        if(j==n){break;}
        cout<<"x";
        j++;
     }
     }
     cout<<endl;
     j=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,j=1,k=1;
    cin>>n;
    for(int i=0;i<n;i++){
        for(int m=0;m<k;m++){
            if (j==1){
                cout<<'o';
            }
            else{
                cout<<'x';
            }
        }
        j*=-1;
        int l=j;
        for(int i=0;i<n-k;i++){
            if (l==1){
                cout<<'o';
            }
            else{
                cout<<'x';
            }
            l*=-1;
        }
        k++;
        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(j<=i){
                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