Public submissions
Source code of every submission to this problem in this contest
will be visible for everyone since 2013-10-31 11:19:12.
Submit | All submissions | Best solutions | Back to list |
CPTTRN8 - Character Patterns (Act 8) |
Print a regular grid pattern with diamond-like base elements. Use the \ (backslash) and the / (slash) characters to print the borders and the * (asterisk) to print the inner part of the diamonds. Use . (dots) to fill the rest of the space.
Input
You are given t - the number of test cases and for each of the test cases three positive integers: r - the number of rows, c - the number of columns in the grid and s - the size of each diamond.
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 4 4 1 2 5 2 Output: ./\. /**\ \**/ .\/. ./\. /**\ \**/ .\/. ./\. /**\ \**/ .\/. /\/\/\/\ \/\/\/\/ /\/\/\/\ \/\/\/\/ /\/\/\/\ \/\/\/\/ /\/\/\/\ \/\/\/\/ ./\../\../\../\../\. /**\/**\/**\/**\/**\ \**/\**/\**/\**/\**/ .\/..\/..\/..\/..\/. ./\../\../\../\../\. /**\/**\/**\/**\/**\ \**/\**/\**/\**/\**/ .\/..\/..\/..\/..\/.
Added by: | kuszi |
Date: | 2013-10-31 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Public source code since: | 2013-10-31 11:19:12 |
hide comments
2015-01-26 08:25:31 lopiavodsky
me too |
|
2014-01-19 16:12:38 Kaustubh Mallik
I tried it similar to char pattern , act 7, got WA, any help.:( |