Submission #715094

# Submission time Handle Problem Language Result Execution time Memory
715094 2023-03-25T22:22:00 Z TheConverseEngineer Bold (COCI21_bold) C++17
50 / 50
1 ms 308 KB
#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 time Memory Grader output
1 Correct 1 ms 308 KB Output is correct
2 Correct 1 ms 300 KB Output is correct
3 Correct 1 ms 308 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct