Submission #516369

#TimeUsernameProblemLanguageResultExecution timeMemory
516369KoDBold (COCI21_bold)C++17
50 / 50
0 ms204 KiB
#include <bits/stdc++.h> using std::vector; using std::array; using std::pair; using std::tuple; int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); int N, M; std::cin >> N >> M; vector grid(N, vector<char>(M)); for (int i = 0; i < N; ++i) { for (int j = 0; j < M; ++j) { std::cin >> grid[i][j]; char c = grid[i][j]; if (i > 0 and grid[i - 1][j] == '#') c = '#'; if (j > 0 and grid[i][j - 1] == '#') c = '#'; if (i > 0 and j > 0 and grid[i - 1][j - 1] == '#') c = '#'; std::cout << c; } std::cout << '\n'; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...