#P6321. [COCI 2006/2007 #4] SKENER
[COCI 2006/2007 #4] SKENER
Background
Mirko is looking at a magazine through a magnifying glass.
Problem Description
He is looking at a magazine of rows and columns. The magnifying glass has two parameters, , meaning that each character is converted into a matrix of rows and columns.
Given the original magazine, help him find the image of the magazine under the magnifying glass.
Input Format
The first line contains four integers .
The next lines each contain characters. The characters may be digits, letters, or ..
Output Format
Output a matrix with rows and columns, representing the image under the magnifying glass.
3 3 1 2
.x.
x.x
.x.
..xx..
xx..xx
..xx..
3 3 2 1
.x.
x.x
.x.
.x.
.x.
x.x
x.x
.x.
.x.
Hint
Constraints
For of the testdata, it is guaranteed that and .
Notes
This problem is translated from COCI2006-2007 CONTEST #4 T2 SKENER
Translated by ChatGPT 5