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

    }

}

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

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

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

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>
char f(int i, int j){
        if(i>=j){
                if(i%2==1) return 'o';
                else return 'x';
        }
        else{
                if(j%2==1) return 'o';
                else return 'x';
        }
}
main_program{
        int n;
        cin>>n;
        int i=1,j=1;
        while(1){
                if(j<=n){ cout<<f(i,j); j++;}
                if(j==n+1){j=1;i++;cout<<endl;}
                if(j==1&&i==n+1) break;
        }
}

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

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

        }else{
            repeat(k){
                cout<<'o';
            }
            int i=n-k;
            if (i%2==0){
                repeat(i/2){
                    cout<< 'x'<< 'o';
                }
            }
            if (i%2!=0){
                cout<<'x';
                repeat((i-1)/2){
                    cout<<'o'<<'x';
                }
            }
            cout<< endl;

        }
    }

}

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

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

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

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

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

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 i;int j=0;int k;int n;
        cin >> n;
        while(j!=n){i=0;

        repeat(n){k=max(i,j);
                if(k%2==0){cout <<"o";}
                  else cout << "x";
                  i++;}
        cout << endl;
            j++;}
}

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

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';
				}
				cout << 'x';
				repeat((n-i-1)/2){
					cout << "ox";
				}
				cout << endl;
			}
			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";
                                }
                                cout << endl;
                        }
                        else{
                                repeat(i){
                                        cout << 'x';
                                }
				cout << 'o';
                                repeat((n-i-1)/2){
                                        cout << "xo";
                                }
                                cout << endl;
                        }
                }
	}

}

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

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

    }

}

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

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

The pattern always starts with the character 'o'.

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

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

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

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


Note

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

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

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

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

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

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

Grading criterion: Printing the 'o' or 'x' in the pattern
Rating A: Correctly determines whether to print 'o' or 'x' and prints it

Rating B: Some minor issues like computing whether the row is even or odd, determining the next character, etc

Rating C: Some issue. 

Rating D: Major issue. 

Assigned grade: A