题库练习 [COCI-2020-2021-contest6]#3 Bold
← 上一题 下一题 →

A1396 | [COCI-2020-2021-contest6]#3 Bold

来源COCI
时间限制1s
内存限制128MB
通过 / 提交0/0

题目描述

In addition to the usual age-related health problems such as first signs of RSI 1 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 2 × 2 square of ’#’ in the down-right direction.

输入格式

The first line contains integers n and m (2 ≤ n, m ≤ 100), the dimensions of the letter.
Each of the following n lines contains m characters ’.’ and ’#’ that represent Paula’s letter.
The last row and column won’t contain any ’#’.

输出格式

Output n lines containing m characters ’.’ and ’#’, representing the bold letter.

输入输出样例

输入 #1
4 4
....
.#..
....
....
输出 #1
....
.##.
.##.
....
输入 #2
7 7
.......
.####..
.#...#.
.#...#.
.#...#.
.####..
.......
输出 #2
.......
.#####.
.######
.##..##
.##..##
.######
.#####.
C++ 编辑器
输入
输出