Ուղարկել | Բոլոր լուծումները | Լավագույն լուծումները | Վերադառնալ ցուցակին |
COCI0012 - SKENER |
Having 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 R rows and C columns. The characters are letters of the English alphabet, digits and the character '.' (period). Mirko's scanner supports two parameters, ZR and ZC. It substitutes each character it scans with a matrix of ZR rows and ZC 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.
The first row contains four integers, R, C, ZR and ZC. R and C are between 1 and 50, while ZR and ZC are between 1 and 5.
Each of the following R rows contains C characters each, representing the article from "Moja Tajna".
Output.
The output should be a matrix of characters with R·ZR rows and C·ZC columns, the enlarged article.
Sample tests.
N |
stdin |
stdout |
1 |
3 3 1 2 .x. x.x .x. |
..xx.. xx..xx ..xx.. |
2 |
3 3 2 1 .x. x.x .x. |
.x. .x. x.x x.x .x. .x. |
Ավելացրեց. | Հրանտ Հովհաննիսյան |
Ամսաթիվ. | 2016-05-09 |
Ժամանակի սահմանափակումը. | 1s |
Ծրագրի տեքստի սահմանափակումը. | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Լեզուներ. | Բոլորը բացի ASM32 ASM64 GAWK CLPS CLOJURE D ERL FSHARP FORTRAN GOSU HASK ICON ICK JS-MONKEY NEM NIM OBJC-CLANG PICO PIKE PYPY PYPY3 PY_NBC RUST SCM guile CHICKEN SED TCL WHITESPACE |
Աղբյուրը. | COCI, Contest #4, 2006-2007 |