Submission #486444

#TimeUsernameProblemLanguageResultExecution timeMemory
486444davi_bartBold (COCI21_bold)C++17
50 / 50
1 ms204 KiB
#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; #define ll long long #define int ll #define fi first #define se second #define ld long double #define pb push_back mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); signed main() { ios::sync_with_stdio(false); cin.tie(0); int N, M; cin >> N >> M; char a[N][M]; for (int i = 0; i < N; i++) { string h; cin >> h; for (int j = 0; j < M; j++) { a[i][j] = h[j]; } } for (int i = N - 2; i >= 0; i--) { for (int j = M - 2; j >= 0; j--) { if (a[i][j] == '#') { a[i + 1][j + 1] = '#'; a[i + 1][j] = '#'; a[i][j + 1] = '#'; } } } for (int i = 0; i < N; i++) { for (int j = 0; j < M; j++) { cout << a[i][j]; } cout << endl; } }
#Verdict Execution timeMemoryGrader output
Fetching results...