# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
966711 | AliHasanli | Bold (COCI21_bold) | C++17 | 1 ms | 604 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 <iostream>
using namespace std;
int main()
{
int n,m;
cin>>n>>m;
char a[n][m];
for(int i=0;i<n;i++)
for(int j=0;j<m;j++)
cin>>a[i][j];
for(int i=0;i<n-1;i++)
for(int j=0;j<m-1;j++)
{
if(a[i][j]=='#' && a[i+1][j]=='.')a[i+1][j]='?';
if(a[i][j]=='#' && a[i+1][j+1]=='.')a[i+1][j+1]='?';
if(a[i][j]=='#' && a[i][j+1]=='.')a[i][j+1]='?';}
for(int i=0;i<n;i++){
for(int j=0;j<m;j++)
if(a[i][j]!='.')cout<<"#";else cout<<".";cout<<endl;}
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |