COCI '06 Contest 4 #2 Skener
View as PDFHaving solved the match issue, Mirko faced another challenging problem. His mom ordered him to read an article about the newest couples on the Croatian show-biz scene in the "Moja Tajna" magazine. The article is written in a very small font size which Mirko cannot read. Luckily, Mirko has a scanner in the closet which will enlarge the article for him.
The article is a matrix of characters with  rows and 
 columns. The characters are letters of the English alphabet, digits and the character 
. (period). Mirko's scanner supports two parameters,  and 
. It substitutes each character it scans with a matrix of 
 rows and 
 columns, where all entries are equal to the scanned character.
Mirko realized his scanner's software no longer works so he needs your help.
Input Specification
The first row contains four integers, , 
, 
 and 
. 
 and 
 are between 
 and 
, while 
 and 
 are between 
 and 
.
Each of the following  rows contains 
 characters each, representing the article from "Moja Tajna".
Output Specification
The output should be a matrix of characters with  rows and 
 columns, the enlarged article.
Sample Input 1
3 3 1 2
.x.
x.x
.x.
Sample Output 1
..xx..
xx..xx
..xx..
Sample Input 2
3 3 2 1
.x.
x.x
.x.
Sample Output 2
.x.
.x.
x.x
x.x
.x.
.x.
Comments