# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
851291 |
2023-09-19T11:38:59 Z |
dosts |
Bold (COCI21_bold) |
C++14 |
|
0 ms |
348 KB |
#include <bits/stdc++.h>
using namespace std;
#define sp << " " <<
//#define int long long
#define vi vector<int>
#define pb push_back
#define F(xxx,yyy) for (int xxx=1;xxx<=yyy;xxx++)
const int N = 2e5+1;
void solve() {
int n,m;
cin >> n >> m;
char grid[n+2][m+2],grid2[n+2][m+2];
for (int i=1;i<=n;i++){
string s;
cin >> s;
for (int j=1;j<=m;j++) {
grid2[i][j] = grid[i][j] = s[j-1];
}
}
for (int i=1;i<=n;i++) {
for (int j=1;j<=m;j++) {
if (grid[i][j] == '#') grid2[i+1][j+1]='#',grid2[i+1][j]='#',grid2[i][j+1]='#';
}
}
F(i,n) {
F(j,m) cout << grid2[i][j];
cout << endl;
}
}
signed main() {
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int t = 1;
//cin >> t;
while (t --> 0) solve();
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |