|Submit||All submissions||Best solutions||Back to list|
CPTTRN1 - Character Patterns (Act 1)
Using two characters: . (dot) and * (asterisk) print a chessboard-like pattern. The first character printed should be * (asterisk).
You are given t < 100 - the number of test cases and for each of the test cases two positive integers: l - the number of lines and c - the number of columns in the pattern (l, c < 100).
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.
Input: 3 3 1 4 4 2 5 Output: * . * *.*. .*.* *.*. .*.* *.*.* .*.*.
|Cluster:||Cube (Intel G860)|
|Languages:||All except: ASM64|
|Public source code since:||2013-08-24 14:43:43|
how to check rankings
easy :D AC in one go..
2014-01-19 10:19:20 Kaustubh Mallik
can we discuss these questions on forum as these are from contest. plz reply..
2014-01-19 10:15:10 Kaustubh Mallik
Is newline needed after last output pattern?
[edit by kuszi: No]
Last edit: 2014-01-19 15:50:47
2014-01-14 11:21:39 kuszi
@Snehasish Karmakar: all below 100 (the statemen has been updated)
PS: the solution should not rely on this information.
Last edit: 2014-01-14 11:23:46
2014-01-14 08:08:39 Snehasish Karmakar
@Łukasz Kuszner : What are the limits of t,l and c ?
2013-12-19 09:39:23 kuszi
@Mitch Schwartz - thank you. Missing newline appended.
2013-12-19 07:00:13 Mitch Schwartz
The last line of input isn't terminated with a newline in at least one input file.
Last edit: 2013-12-19 17:18:16