CPTTRN5  Character Patterns (Act 5)
Using two characters: . (dot) and * (asterisk) print a gridlike pattern. The grid will have l lines, c columns, and each square shaped element of the grid will have the height and width equal to s.
Moreover, each of the grid elements will have a diagonal. The diagonal of the first square in the first line of the grid is directed towards down and right corner  use the \ (backslash) character to print it; while the next diagonal will be directed towards upper right corner  use the / (slash) character to print it. Print the successive diagonals alternately (please consult the example below).
Input
You are given t  the number of test cases and for each of the test case three positive integers: l  the number of lines, c  the number of columns in the grid and s  the size of the single square shaped element.
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: **** *\.* *.\* **** *./* */.* **** *\.* *.\* **** ********* *\*/*\*/* ********* */*\*/*\* ********* *\*/*\*/* ********* */*\*/*\* ********* **************** *\.*./*\.*./*\.* *.\*/.*.\*/.*.\* **************** *./*\.*./*\.*./* */.*.\*/.*.\*/.* ****************
hide comments
nullius_in7:
20200326 18:55:32
Divide it into the 4 sections (even and odd by row, and even and odd by column) That really helped me 

mano_sriram:
20190707 18:18:58
Can s be greater than l ?? 

oinon27:
20180420 18:11:31
Why "wrong answer" when my program give the same answer as example???


masterchef2209:
20180317 17:02:37
this is a tricky one Last edit: 20180317 17:03:11 

saloni1912:
20171218 12:24:47
My solution runs well on ideone but I am getting wrong answer here on spoj. Please can you give me the solution?


mananj02:
20170927 19:42:14
hint  for slashes think of property of diagonals of a square. 

mananj02:
20170927 19:41:20
I thought it will be hard for me to solve it but, when I read the question I did it in not more than 10 mins. 

codehungry95:
20170917 09:16:04
Finally :D


rushikeshkoli:
20170902 09:25:36
That was hard for me!!! 

radvein:
20170827 13:13:56
(i+j)%((s+1)*2)==0 for / 
Added by:  kuszi 
Date:  20120904 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 