# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
495253 | kappa | Bold (COCI21_bold) | C++14 | 1 ms | 316 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 namespace std;
int n, m;
char matrix[105][105], mat[105][105];
int main(){
memset(mat, '.', sizeof(mat));
cin >> n >> m;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < m; j++)
{
cin >> matrix[i][j];
}
}
for (int i = 0; i < n; i++)
{
for (int j = 0; j < m; j++)
{
if(matrix[i][j] == '#'){
n = max(n, i + 2);
m = max(m, j + 2);
mat[i][j] = '#';
mat[i + 1][j] = '#';
mat[i][j + 1] = '#';
mat[i + 1][j + 1] = '#';
}
}
}
cout << "\n";
for (int i = 0; i < n; i++)
{
for (int j = 0; j < m; j++)
{
cout << mat[i][j];
}
cout << "\n";
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |