10403 - problem1   

Description

Let’s draw a picture with symbol ‘*’ on a 10*10 board which is initially plotted a symbol ’-’ at each location. We consider four different line patterns (down(D)/up(U)/left(L)/right(R)) as follows:

You will be given the coordinate of the pattern’s starting point, the direction of the pattern and the length of the pattern.

 

There is a point that you should know.

1.      You should check if the pattern you draw crosses the boundary of the board. The part which is beyond the board should be ignored.

For example:

        

You may use the following piece of code:

#include 
#define SIZE 10

void printboard();
char board[SIZE][SIZE];
int i,j;

int main(){

    int n,row,col,len;
    char dir;

    for(i=0;i
  

Input

The input contains several lines. The first line contains number N which represents the total number of patterns that you should draw. Each of the remaining lines contains the coordinate of the pattern’s starting point, the direction of the pattern and the length of the pattern.

Output

The output should print the 10*10 board.

Sample Input  Download

Sample Output  Download

Tags




Discuss