Public submissions
Source code of every submission to this problem in this contest
will be visible for everyone since 2013-08-24 14:50:13.
Submit | All submissions | Best solutions | Back to list |
CPTTRN6 - Character Patterns (Act 6) |
Given specified dimensions, print a grid-like pattern. Use the | (pipe) sign to print vertical elements, the - (minus) to print horizontal ones and + (plus) for crossings. The rest of the space fill with . (dots) characters.
Input
You are given t - the number of test cases and for each of the test cases four positive integers: l - the number of horizontal elements, c - the number of vertical elements in the grid; h and w - the high and the width of the single rectangle respectively.
Output
For each of the test cases output the requested pattern (please have a look at the example). Use one line break in between successive patterns.
Example
Input: 3 3 1 2 1 4 4 1 2 2 5 3 2 Output: .|. .|. -+- .|. .|. -+- .|. .|. -+- .|. .|. ..|..|..|..|.. --+--+--+--+-- ..|..|..|..|.. --+--+--+--+-- ..|..|..|..|.. --+--+--+--+-- ..|..|..|..|.. --+--+--+--+-- ..|..|..|..|.. ..|..|..|..|..|.. ..|..|..|..|..|.. ..|..|..|..|..|.. --+--+--+--+--+-- ..|..|..|..|..|.. ..|..|..|..|..|.. ..|..|..|..|..|.. --+--+--+--+--+-- ..|..|..|..|..|.. ..|..|..|..|..|.. ..|..|..|..|..|..
Added by: | kuszi |
Date: | 2012-09-04 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Public source code since: | 2013-08-24 14:50:13 |