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

int concentric(){
        int n; char x = x; char o = o;
        cin >> n;
        for(int i = 0;i<=n;i++){
                char a; char b;
                repeat(n){
                        a=i*"o";
                        b=i*"x";
                        cout << a << b;
                }
        }
}
main_program{
        return concentric(n);
}

// so basically in this code, for easier understanding, we have to print the 1st type ie "o" equal to the row number, 2nd row means 2 o and then alternate char, this will evetually lead to a formation of L type output of o and 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: 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;
        repeat(n/2){
                for(int i=0;i<n;i++){

                        if(n%2==0){
                                repeat(2*i){
                                        cout<<"x";
                                }
                        }
                        else {
                                repeat(2*i){
                                        cout<<"o";
                                }
                        }
                        repeat((n-i)/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;
	int counteven = 2;
	int countodd = 1;
	for(int i=1; i<=n; i++){
		if(i%2 == 0){
			repeat(counteven){
				cout <<"x";
			}
			counteven=counteven+2;			
			if(n%2==0){			
			    repeat((n-i)/2){
				    cout<<"ox";
			    }
            }
			if(n%2==1){
				repeat((n-i)/2){
				cout<<"ox";
			    }
			cout<<"o";}		
		}
		if(i%2 == 1 ){
			repeat(countodd){
				cout<<"o";
			}
			countodd=countodd+2;
			if(i!=n){
				cout<<"x";
            }			
			if(n%2==0){			
			    repeat((n-i-1)/2){
				    cout<<"ox";
			    }
			}
			if(n%2==1 && i!=n){
				repeat((n-i-1)/2){
				cout<<"ox";
			    }
			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; 
    while (true){ 
        while(ture){
            repeat(n) 
            cout << 0 ;
            i++
        }
        cout << 0 endl
        cout << 0 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: 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 i,j,n;
        cin >> n;
for(i=1,i<=n,i++){
        for(j=1,j<=n,j++){
                if(i%2==0 && j%2==0) cout << "x";
                else if(i%2==0 && j%2!=0) cout << "o";
                else if(i%2!=0 && j%2==0) cout << "x";
                else 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,i=1,j=1;
   cin >> n;
   
   
     for(j=1;j<=n;j=j+2)
     {       
        repeat(j)
        {       
          cout << "o";          
        } 
        
        repeat((n-i)/2)
        {
          cout << "x" << "o";   
        }

        if((n-i)%2!=0)
          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: 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;
    int x=1;
    while(x<=n){
        int y=1;
        while(y<=n){
            if(x>=y){
                if(x%2==0){
                    cout << "x";
                }
                else cout << "o";
            }
            if(y>x){
                if(y%2==0){
                    cout << "x";
                }
                else cout << "o";
            }
            y++;
        }
        cout << endl;
        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: 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 k=1;
    while(k<=n) {
        if (k%2==1){
            int p=1;
            while(p<=k){
                cout<<"o";
                p++;}
                while(1){
                    if(p>n) break;
                    if (p%2==1) cout<<"o";
                    else cout<<"x";
                    p++;
                }}
        else{
            int p=1;
            while(p<=k){
                cout<<"x";
                p++;}
                while(1){
                    if(p>n) break;
                    if (p%2==1) cout<<"o";
                    else cout<<"x";
                    p++;
                }}        
        k++;
        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;
char x,y;
cin>>n;
x='0';
y='x';
int i;
char temp;
i=1;
  repeat(n){
          repeat(i){
                  cout<<x;
          }
          if((int((n-i)/2))%2==0){
                  repeat((n-i)/2){
                          cout<<y<<x;
                          cout<<endl;
                  }}
          else{
                  repeat((n-i/2))
          {cout<<y<<x;}
                  cout<<y;
                  cout<<endl;
          }
          temp=y;
          y=x;
          x=temp;
          i=i+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: 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 x(){cout << "x";}
void p(){cout << "o";}
main_program{
             int n,m,l,k,y;
             cin >> n;
             m=n;
             l=1;
             k=m;
             y=0;
             while(k!=0){int o=l;
                         int z=l%2;
                         n=m;

                                     if(z==0){repeat(l){x();};
                                                n=n-1;}
                                     else{repeat(l){p();};n=n-1;}
                          while(n!=0){if(z==0){if(y%2==0){p();}
                                               else{x();}

                                              }
                                      else{if(y%2==0){x();}
                                           else{p();}
                                          }
                                      y=y+1;
                                      n=n-1;
                                     }
                         cout << endl;
                         l=l+1;
                         k=k-1;
                         y=0;
                        }
            }

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, count=1;
        cin>>n;
        char a='o', b='x', c, d, e;
        for(int i=1; i<=n; i++) {
                for(int j=1; j<=count; j++) {
                        cout<<a;
                }
                d=a;
                e=b;
                for(int k=1; k<=n-count; k++) {
                        cout<<e;
                        c=e;
                        e=d;
                        d=c;
                }
                cout<<endl;
                c=a;
                a=b;
                b=c;
                count=count+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++) {

                if (i%2!=0) {
                        for(int j=1; j<=i; j++) {
                        cout << "o";

                        }

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

                        else {
                                for(int l=1; l<= ((n-i)/2); l++) {
                                        cout << "x"<< "o";
                                }
                        }
                }

                if (i%2==0) {
                        for(int m=1; m<=i; m++) {
                                cout << "x";
                        }

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