#P6321. Magnified Magazine
Magnified Magazine
Magnified Magazine
You are given a magazine with r rows and c columns, and a magnifier with parameters zr and zc. The magnifier transforms each character into a zr \times zc matrix by replicating it zr times vertically and zc times horizontally.
Your task is to output the magnified image of the magazine.
Note: All formulas are in \( \LaTeX \) format. For example, the parameters are given as \( r \), \( c \), \( zr \), and \( zc \), and the replicated matrix has dimensions \( zr \times zc \).
inputFormat
The first line of input contains four integers: r
, c
, zr
, and zc
.
Each of the next r
lines contains a string of c
characters representing a row of the magazine.
outputFormat
Output the image of the magazine after applying the magnifier. Each row of the original magazine is expanded as follows: each character is repeated zc
times horizontally, and then the entire row is repeated zr
times vertically.
sample
2 2 2 3
ab
cd
aaabbb
aaabbb
cccddd
cccddd
</p>