# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
619163 | Hussein3602 | Bold (COCI21_bold) | C++14 | 1 ms | 300 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 ;
typedef long long ll ;
int dx[]={0,1,1} ;
int dy[]={1,0,1} ;
char s[200][200] ;
bool vis[200][200] ;
int n , m ;
int main()
{
cin >> n >> m ;
for(int i=0;i<n;i++)
{
for(int j=0;j<m;j++)
{
cin >> s[i][j] ;
if(s[i][j]=='#')vis[i][j]=true;
}
}
for(int i=0;i<n;i++)
{
for(int j=0;j<m;j++)
{
if(s[i][j]=='#'&&vis[i][j])
{
for(int k=0;k<3;k++)
{
int nx = dx[k] + j ;
int ny = dy[k] + i ;
if(nx<m&&ny<n)
s[ny][nx]='#' ;
}
}
}
}
for(int i=0;i<n;i++)
{
for(int j=0;j<m;j++)
{
cout<<s[i][j] ;
}
cout<<endl;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |