Submission #494325

# Submission time Handle Problem Language Result Execution time Memory
494325 2021-12-15T06:19:50 Z ktkerem Bold (COCI21_bold) C++17
50 / 50
1 ms 204 KB
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
ll _i=0;
#define ffn(x) _i=x
#define llll pair<ll , ll>
#define stitr set<llll>::iterator
#define fora(y,x) for(ll y=_i;x>y;y++)
#define pb push_back
#define pf push_front
#define debu cout << "hello\n"
#define fi first
#define sec second
#define all(a) a.begin() , a.end()
const ll limit = 1e13 + 7; 
const ll ous=1e6 + 5;
const ll dx[4] = {1 , -1 , 0 , 0} , dy[4] = {0,0,-1,1};
void solve(){
    ll n , m;cin >> n >> m;
    string h[n] , y[n];fora(i,n){
        cin >> h[i];
        y[i] = h[i];
    }
    fora(i,n){
        fora(j,m){
            if(h[i][j] == '#'){
                y[i+1][j] = '#';
                y[i+1][j+1] = '#';
                y[i][j+1] = '#';
            }
        }
    }
    fora(i,n){
        cout << y[i] << "\n";
    }
    return;
}
signed main(){
    ios_base::sync_with_stdio(false);cin.tie(NULL);
    ll t=1;
    //cin >> t;
    while(t--){
        solve();
    }
    return 0; 
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct