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,i=1;
    cin >> n;
    repeat(n){
        if(n%2==0){
            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;
    }
    if(n%2!=0){
            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;
    }
    i++;
}
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

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

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

                        }
                        else cout<<"o";

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

                        }
                        else cout<<"x";


                    }
                }
                cout<<endl;
                

            }
            
        
    }

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

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;
        repeat(n/2) {
cout << o << x;
        }
        cout << endl;
        cout << x << x;
        repeat((n/2) - 1) {
                cout << o << x << o;
        }       
        cout << endl;

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

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 firstline(int n){if (n%2==0){repeat(n/2){
                      cout<<"o"<<"x"<<endl;}}
                     else{repeat(n-1/2){cout<<"o"<<"x";}
                                        cout<<"o"<<endl;}}
void nextline(int m=1){repeat(m){cout<<"x"<<"x";}}
void nextnextline(int m=1){repeat(m){cout<<"o"<<"o";}}
void lastline(int n){if (n%2==0){repeat(n){cout<<"x";}}
                     else repeat(n){cout<<"o";}}
main_program{int m,n;
        cin>>n;
        cout<<firstline(n)<<endl;
         if((n-1)%2==0){
         while(m<=(n-1)/2){cout<<nextline(m=1)<<firstline(n-2)<<endl;
        cout<<nextnextline(m=1)<<firstline(n-2)<<endl;
                m=m+1;}}
         else{while (m<n/2){cout<<nextline(m=1)<<firstline(n-2)<<endl;
                 cout<<nextnextline(m=1)<<firstline(n-2)<<endl;
                 m=m+1;}}
             cout<<lastline(n);}

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

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

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

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 r = 1; r <= n; r++){
        for(int c = 1; c <= n; c++){
            if(c <= r && r % 2 == 1)
                cout<< "o";
            else if(r <= c && c % 2 == 1)
                cout<< "o";
            else   
                cout<< "x";
        }
        cout<< endl;
    }
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

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{
char a,b;
long n,o=0;
cin >> n>>a;
b=a;
if(b=='a'||b=='i'||b=='e'||b=='o'||b=='u')
o=1;
repeat(n-1){
cin >> a;
if((b!='a'&&b!='i'&&b!='e'&&b!='o'&&b!='u') && (a=='a'||a=='i'||a=='e'||a=='o'||a=='u'))
        o=o+1;
b=a;
}
cout<<o;
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

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

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

        }
        }
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

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

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

Rating B: Some issue. 

Rating C: Major issue. 

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

The pattern always starts with the character 'o'.

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

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

Examples

Input:
4

Output:
oxox
xxox
ooox
xxxx

Input:
7

Output:
oxoxoxo
xxoxoxo
oooxoxo
xxxxoxo
oooooxo
xxxxxxo
ooooooo


Input Format

An integer n.


Output Format

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


Note

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

Student submission:
#include<simplecpp>

main_program{
        int n;
        cin >>n;
        char o = 'o';
        char x = 'x';
        for( int i=1; i<=n; i++){
                if(i%2==1){repeat(i){cout<<o;}}
                else{repeat(i){cout<<x;}}
                for(int odev=i-1; odev<n-1; odev++){
                        while((odev<n-1)){
                                if(odev%2==0) cout<<x;
                                else cout<<o;
                                odev=odev+1;

                        }
}
cout <<endl;
}
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

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){ cout << 'o';}
			else if(j %2 ==1 && j>=i){ cout << 'x';}
			else if(i %2 ==0 && i>j){ cout << 'o';}
			else if(i %2 ==1 && i>j){ cout << 'x';}
		}
		cout << endl;
	
	}

}

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

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;
    while(i<=n){
        if (i%2 != 0){
            int r = 1;
            while(r<=n){
                if ((r%2 == 0) && (r > i)){
                    cout << "x";
                }
                else 
                    cout << "o";
                r++;
            }
        }
        if (i%2 == 0){
            int q = 1;
            while(q <= n){
                if (q <= i || q%2 == 0){
                    cout << 'x';
                }
                else 
                    cout << "o";
                q++;
            }
        }
        cout << endl;
        i++;
    }
}

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

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

Grading criterion: Declaration of variables
Rating A: correctly declares the variable(s) as required

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A