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;

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

                int max;
                if(x>=y){max=x;}
                else{max=y;}

                if(max%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;
        cin >> n;
        for (int i = 1; i <= n; i ++){
                for (int j = 1; j <= n; j++){
                        if(max(i , 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;
    cin >> n;

    if (n%2 != 0) {

    for (int i=1; i<=n; i++) {

        if(i%2 == 0){
            for(int j=0;j<i;j++) cout<<"x";
            cout<<"o";
            for(int j =0; j<((n-i-1)/2); j++) cout << "xo";
        }
        else{
           for(int j=0;j<i;j++) cout<<"o";
           for(int j =0; j<((n-i)/2); j++) cout << "xo";
        }
        cout << endl;
    } }

    else {
            for (int i=1; i<=n; i++) {

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


                else{
                        for(int j=1;j<=r;j++)
                                cout<<"x";
                for(int w=1;w<=(n-r)/2;w++)
                        cout<<"ox";
                if(n%2!=0)
                        cout<<"o";
                cout<<endl;}

                r=r+1;
}
}

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

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 i=1,n;
   cin >> n;

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

                }
                cout << '\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