题目描述
Problem Description
Paula has written a letter to Daniel and needs to bold the text for Daniel, whose vision has deteriorated.
The letter can be represented as a matrix consisting of . and #. For every existing # in the letter, Paula needs to extend it to a $2 \times 2$ # block in the bottom-right direction.
Input Format
The first line contains two integers $n$ and $m$, representing the dimensions of the letter.
The following $n$ lines, each containing $m$ characters, represent the content of the letter.
It is guaranteed that there are no # in the last row and the last column.
Output Format
Output $n$ lines, each containing $m$ characters, representing the bolded letter.
Sample Input and Output
Sample Input #1
4 4
....
.#..
....
....
Sample Output #1
....
.##.
.##.
....
Sample Input #2
7 7
.......
.####..
.#...#.
.#...#.
.#...#.
.####..
.......
Sample Output #2
.......
.#####.
.######
.##..##
.##..##
.######
.#####.
Sample Input #3
9 7
.......
.####..
.#...#.
.#...#.
.####..
.#.....
.#.....
.#.....
.......
Sample Output #3
.......
.#####.
.######
.##..##
.######
.#####.
.##....
.##....
.##....
Notes
Data Size and Constraints
For $100\%$ of the data, $2 \le n, m \le 10^3$. The letter contains only . and #.
Notes
This problem is scored according to the original COCI settings, with a maximum score of $50$.
The problem is translated from COCI2020-2021 CONTEST #6 T1 Bold.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分