제출 #386342

#제출 시각아이디문제언어결과실행 시간메모리
386342model_codeBold (COCI21_bold)C++17
50 / 50
1 ms384 KiB
#include <bits/stdc++.h>
using namespace std;

int n, m;
char in[100][100], out[100][100];

int main() {
    cin >> n >> m;
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            cin >> in[i][j];
            out[i][j] = '.';
        }
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            if (in[i][j] == '#') {
                out[i][j] = '#';
                out[i][j + 1] = '#';
                out[i + 1][j] = '#';
                out[i + 1][j + 1] = '#';
            }
        }
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            cout << out[i][j];
        }
        cout << '\n';
    }

    return 0;
}

#Verdict Execution timeMemoryGrader output
Fetching results...