COCI '20 Contest 6 #1 Bold
View as PDFIn addition to the usual age-related health problems such as first signs of repetitive strain injury and physical injuries that accumulate faster than they heal, Daniel's eyesight has suddenly worsened.
Paula wrote him a letter, but he can't read it without glasses. She needs to bold the text, so Daniel can read it.
The letter can be represented as a matrix consisting of characters . and #. To bold it, Paula will replace each # in the original letter with a  square of 
# in the down-right direction.
Input Specification
The first line contains integers  and 
 
, the dimensions of the letter.
Each of the following  lines contains 
 characters 
. and # that represent Paula's letter.
The last row and column won't contain any #.
Output Specification
Output  lines containing 
 characters 
. and #, representing the bold letter.
Sample Input 1
4 4
....
.#..
....
....
Sample Output 1
....
.##.
.##.
....
Sample Input 2
7 7
.......
.####..
.#...#.
.#...#.
.#...#.
.####..
.......
Sample Output 2
.......
.#####.
.######
.##..##
.##..##
.######
.#####.
Sample Input 3
9 7
.......
.####..
.#...#.
.#...#.
.####..
.#.....
.#.....
.#.....
.......
Sample Output 3
.......
.#####.
.######
.##..##
.######
.#####.
.##....
.##....
.##....
Comments