# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
943735 |
2024-03-11T18:53:33 Z |
vjudge1 |
Bold (COCI21_bold) |
C++11 |
|
1 ms |
348 KB |
#include<bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
int n,m;
cin>>n>>m;
char matriz[n][m];
char matrizans[n][m];
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
cin>>matriz[i][j];
matrizans[i][j]='a';
}
}
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
if(matrizans[i][j]=='a')matrizans[i][j]=matriz[i][j];
if(matriz[i][j]=='#'){
matrizans[i][j+1]='#';
matrizans[i+1][j]='#';
matrizans[i+1][j+1]='#';
}
}
}
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
cout<<matrizans[i][j];
}
cout<<"\n";
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |