Submission #1172932

#TimeUsernameProblemLanguageResultExecution timeMemory
1172932nguyenkhangninh99Bold (COCI21_bold)C++20
50 / 50
0 ms328 KiB
#include <bits/stdc++.h> using namespace std; #define int long long void solve(){ int n, m; cin >> n >> m; vector<vector<char>> a(n + 2, vector<char>(m + 2)), b(n + 2, vector<char>(m + 2, '.')); for(int i = 1; i <= n; i++){ for(int j = 1; j <= m; j++) { cin >> a[i][j]; if(a[i][j] == '#'){ b[i][j] = '#'; b[i + 1][j] = '#'; b[i][j + 1] = '#'; b[i + 1][j + 1] = '#'; } } } for(int i = 1; i <= n; i++) { for(int j = 1; j <= m; j++) cout << b[i][j]; cout << '\n'; } } signed main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); solve(); }
#Verdict Execution timeMemoryGrader output
Fetching results...