#P7550. [COCI 2020/2021 #6] Bold
[COCI 2020/2021 #6] Bold
Description
Paula wrote a letter to Daniel, and she needs to make the text bold so that Daniel, whose eyesight is getting worse, can read it.
The letter can be represented as a matrix consisting of . and #. For every # originally in the letter, Paula needs to expand it to the lower-right into a block of #.
Input Format
The first line contains two integers , representing the size of the letter.
The next lines each contain characters, representing the content of the letter.
It is guaranteed that there is no # in the last row and the last column.
Output Format
Output lines, each containing characters, representing the letter after being made bold.
4 4
....
.#..
....
....
....
.##.
.##.
....
7 7
.......
.####..
.#...#.
.#...#.
.#...#.
.####..
.......
.......
.#####.
.######
.##..##
.##..##
.######
.#####.
9 7
.......
.####..
.#...#.
.#...#.
.####..
.#.....
.#.....
.#.....
.......
.......
.#####.
.######
.##..##
.######
.#####.
.##....
.##....
.##....
Hint
Constraints
For of the testdata, . It is guaranteed that the letter contains only . and #.
Notes
The score of this problem follows the original COCI settings, with a full score of .
Translated from COCI2020-2021 CONTEST #6 T1 Bold.
Translated by ChatGPT 5
京公网安备 11011102002149号