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

Grading criterion: Accepting input
Rating A: correctly accepts an integer as input

Rating B: Some issue. 

Rating C: Major issue. 

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

The pattern always starts with the character 'o'.

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

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

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

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


Note

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

Student submission:
#include<simplecpp>
main_program{
        int N;
        cin >> N;
        for(int n=1; n<=N; n++){
                if(n%2==0){
                        repeat(n){
                                cout<<"x";
                        }
                        if((N-n)%2==0)
                        repeat((N-n)/2){
                                cout<<"o";
                                cout<<"x";
                        }
                        else{
                                repeat((N-n-1)/2){
                                        cout<<"o";
                                        cout<<"x";
                                }
                                cout<<"o";
                }
                }
                else{
                        repeat(n){
                                cout<<"o";
                        }
                        if((N-n)%2==0){
                                repeat((N-n)/2){
                                        cout<<"x";
                                        cout<<"o";
                                }
                        }
                        else{
                                repeat((N-n-1)/2){
                                        cout<<"x";
                                        cout<<"o";
                                }
                                cout<<"x";
                        }
                }
                cout << endl;
        }
}

Grading criterion: Accepting input
Rating A: correctly accepts an integer as input

Rating B: Some issue. 

Rating C: Major issue. 

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

The pattern always starts with the character 'o'.

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

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

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

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


Note

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

Student submission:
#include<simplecpp>

main_program{
       int n;
       cin >> n;
       for (int i=1;i<=n;i++){
              for (int j=1;j<=n;j++){
                      if (((i%2 == 1) && (j <=i)) || ((j%2==1)&& (i <=j))){
                              cout << "o";
 }
                      else cout << "x";

                      }



              cout <<  endl;
              }
}

Grading criterion: Accepting input
Rating A: correctly accepts an integer as input

Rating B: Some issue. 

Rating C: Major issue. 

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

The pattern always starts with the character 'o'.

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

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

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

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


Note

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

Student submission:
#include<simplecpp>
main_program{
        int n,i=1;
        cin >> n;
        repeat(n){
                int j=0;
                if(i%2==0){
                        repeat(i){
                                cout << "x";
                                j++;
                        }
                        while(j<n){
                                cout << "o";
                                j++;
                                if(j<n){
                                        j++;
                                        cout << "x";
                                }
                        }
                        cout << endl;
                        i++;
                }
                else{
                        repeat(i){
                                cout << "o";
                                j++;
                        }
                        while(j<n){
                                cout << "x";
                                j++;
                                if(j<n){
                                        j++;
                                        cout << "o";
                                }
                        }
                        cout << endl;
                        i++;
                }
        }
}

Grading criterion: Accepting input
Rating A: correctly accepts an integer as input

Rating B: Some issue. 

Rating C: Major issue. 

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

The pattern always starts with the character 'o'.

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

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

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

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


Note

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

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

Grading criterion: Accepting input
Rating A: correctly accepts an integer as input

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A
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,s;
	cin>>n;
	s=n*n;
	j=n;
	while(s>0){
		if (i%2!=0){
			bool found=false;
			while(true){
				int p=i;
				while(p>0&& found!=true){
					cout<<'o';
					p--;
					j--;
					s--;
					if (p==0){
						found=true;
					}
				}
				if (j==0){
					j=n;
					break;
				}
				cout<<'x';
				j--;
				s--;
				if (j==0){
                                        j=n;
                                        break;
				}
				cout<<'o';
				j--;
				s--;
			        if (j==0){
                                        j=n;
                                        break;
				}
			}
			i++;
		}
		cout<<endl;
		if( s==0) break;
		if (i%2==0){
			bool found=false;
                        while(true){
                                int p=i;
                                while(p>0&& found!=true){
                                        cout<<'x';
                                        p--;
                                        j--;
                                        s--;
                                        if (p==0){
                                                found=true;
                                        }
                                }
                                if (j==0){
                                        j=n;
                                        break;
                                }
                                cout<<'o';
                                j--;
                                s--;
                                if (j==0){
                                        j=n;
                                        break;
                                }
                                cout<<'x';
                                j--;
                                s--;
                                if (j==0){
                                        j=n;
                                        break;
                                }
                        }
                        i++;
		}
		cout<<endl;
	}
}

Grading criterion: Accepting input
Rating A: correctly accepts an integer as input

Rating B: Some issue. 

Rating C: Major issue. 

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

The pattern always starts with the character 'o'.

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

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

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

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


Note

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

Student submission:
#include<simplecpp>

main_program{
	int n;
	cin >> n;
	for(int i=1; i<=n; i++){
		if(i%2==0){
			int a=1;
			repeat(i){
				cout << "x";
				a++;
			}
			for(; a<=n; a++){
				cout << "o";
				if(a<n){
				       	cout << "x";
					a++;
				}
				if(a==n || a==n+1) cout << endl;
			}
		}
		else{
			int b=1;
			repeat(i){
				cout << "o";
				b++;
			}
			for(; b<=n; b++){
				cout << "x";
				if(b<n){
				       	cout << "o";
					b++;
				}
				if(b==n || b==n+1) cout << endl;
			}
	}
	      
}
}

Grading criterion: Accepting input
Rating A: correctly accepts an integer as input

Rating B: Some issue. 

Rating C: Major issue. 

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

The pattern always starts with the character 'o'.

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

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

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

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


Note

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

Student submission:
#include<simplecpp>
main_program{
	int n  ;
	cin>>n;
 	if ( n%2 == 0) {
		for (int i = 1 ; i <= n; i++ ) {
		       if ( i%2 == 1) {
			  repeat( i) {
			     cout<<"o";
		   	}
	     		repeat(int((n-i)/2)) {
	      			cout<<"xo";			
			}
			cout<<"x";
		
		       }
		       else {
			       repeat(i) {
				       cout<<"x";
			       }
			       repeat((n-i)/2) {
				       cout<<"ox";
			       }
		       }
		       cout<<endl;
		}
	}
	else {
		for ( int i = 1 ; i<=n; i++ ) {
			if ( i%2 ==1) {
				repeat(i) {
					cout<<"o";
				}
				repeat((n-i)/2) {
					cout<<"xo";
				}
			}
			else {

				repeat(i) {
					cout<<"x";
				}
				repeat((n-i)/2) {
					cout<<"ox";
				}
				cout<<"o";
			}
			cout<<endl;
		}
	}
}

Grading criterion: Accepting input
Rating A: correctly accepts an integer as input

Rating B: Some issue. 

Rating C: Major issue. 

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

The pattern always starts with the character 'o'.

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

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

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

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


Note

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

Student submission:
#include<simplecpp>
main_program{
    int n;
    cin >> n;
    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<< endl;
    }
}

Grading criterion: Accepting input
Rating A: correctly accepts an integer as input

Rating B: Some issue. 

Rating C: Major issue. 

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

The pattern always starts with the character 'o'.

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

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

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

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


Note

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

Student submission:
#include<simplecpp>
void 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: Accepting input
Rating A: correctly accepts an integer as input

Rating B: Some issue. 

Rating C: Major issue. 

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

The pattern always starts with the character 'o'.

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

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

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

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


Note

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

Student submission:
#include<simplecpp>
main_program{

        int n;
        cin>>n;

        if(n==2)cout<<"ox"<<endl<<"xx"<<endl;
        if(n==5)cout<<"oxoxo"<<endl<<"xxoxo"<<endl<<"oooxo"<<endl<<"xxxxo"<<endl<<"ooooo"<<endl;
        if(n==7)cout<<"oxoxoxo"<<endl<<"xxoxoxo"<<endl<<"oooxoxo"<<endl<<"xxxxoxo"<<endl<<"oooooxo"<<endl<<"xxxxxxo"<<endl<<"ooooooo"<<endl;}

Grading criterion: Accepting input
Rating A: correctly accepts an integer as input

Rating B: Some issue. 

Rating C: Major issue. 

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

The pattern always starts with the character 'o'.

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

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

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

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


Note

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

Student submission:
#include<simplecpp>
main_program {
int n,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: Accepting input
Rating A: correctly accepts an integer as input

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A