|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|10 초||512 MB||12||9||7||70.000%|
Games that are commonly found in the Unix System during the 70s and 80s are design in text mode. Grid is the basic layout for many of these games where pieces or items are positioned in rows and columns. Classic examples would be tic-tac-toe, chess and minesweeper. You are to design a simple text-based grid layout engine that can be used in the games.
Given specified dimensions, print a text-based grid pattern. Use the | (pipe) sign to print vertical elements, the – (minus) to print horizontal ones and + (plus) for crossing. The rest of the spaces are filled with * (asterisk).
The first line of input contains a positive integer N (N ≤ 100) which indicates the number of test cases. Each of the following N lines contains four positive integers: row – the number of rows, col – the number of columns, w and h – the width and height of the single grid respectively. (1 ≤ row, col ≤ 10; 1 ≤ w, h ≤ 5 )
For each test case, output a line in the format "Case #x:" where x is the case number (starting from 1), follow by the grid pattern as shown in the sample output.
2 2 2 2 2 1 3 3 1
Case #1: +--+--+ |**|**| |**|**| +--+--+ |**|**| |**|**| +--+--+ Case #2: +---+---+---+ |***|***|***| +---+---+---+