# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
516369 |
2022-01-21T08:39:02 Z |
KoD |
Bold (COCI21_bold) |
C++17 |
|
0 ms |
204 KB |
#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 |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |