답안 #484575

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
484575 2021-11-04T13:05:06 Z rainboy Bold (COCI21_bold) C
50 / 50
1 ms 204 KB
#include <stdio.h>

#define N	100
#define M	100

int main() {
	static char cc[N][M + 1];
	int n, m, i, j;

	scanf("%d%d", &n, &m);
	for (i = 0; i < n; i++)
		scanf("%s", cc[i]);
	for (i = n - 1; i >= 0; i--)
		for (j = m - 1; j >= 0; j--)
			if (cc[i][j] == '#')
				cc[i][j + 1] = cc[i + 1][j] = cc[i + 1][j + 1] = '#';
	for (i = 0; i < n; i++)
		printf("%s\n", cc[i]);
	return 0;
}

Compilation message

bold.c: In function 'main':
bold.c:10:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |  scanf("%d%d", &n, &m);
      |  ^~~~~~~~~~~~~~~~~~~~~
bold.c:12:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |   scanf("%s", cc[i]);
      |   ^~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct