Submission #715094

#TimeUsernameProblemLanguageResultExecution timeMemory
715094TheConverseEngineerBold (COCI21_bold)C++17
50 / 50
1 ms308 KiB
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for(int i = a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() #define sqr(x) ((ll)(x))*(x) typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; char letter[102][102]; int N, M; int main() { cin >> N >> M; FOR(y, 0, N) { letter[0][y+1] = '.'; FOR(x, 0, M) { cin >> letter[x+1][y+1]; } } FOR(x, 0, M) letter[x+1][0] = '.'; FOR(y, 0, N) { FOR(x, 0, M) { if (letter[x][y] == '#' or letter[x+1][y] == '#' or letter[x][y+1] == '#' or letter[x+1][y+1] == '#') cout << "#"; else cout << "."; } cout << "\n"; } }
#Verdict Execution timeMemoryGrader output
Fetching results...