# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
516369 | KoD | Bold (COCI21_bold) | C++17 | 0 ms | 204 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |