Logo
(追記) (追記ここまで)

21221번 - Bold 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB19316815086.705%

문제

In addition to the usual age-related health problems such as first signs of RSI1 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.

1Repetitive strain injury. Never ignore the pain caused by typing. Ergonomic aids and chairs are generally always worth it. Sit straight. “A gram of prevention is worth a kilo of cure.”

입력

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

.......
.#####.
.######
.##..##
.##..##
.######
.#####.

예제 입력 3

9 7
.......
.####..
.#...#.
.#...#.
.####..
.#.....
.#.....
.#.....
.......

예제 출력 3

.......
.#####.
.######
.##..##
.######
.#####.
.##....
.##....
.##....

힌트

출처

Contest > Croatian Open Competition in Informatics > COCI 2020/2021 > Contest #6 1번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /