Submission #837331

#TimeUsernameProblemLanguageResultExecution timeMemory
837331vjudge1Bold (COCI21_bold)C++17
50 / 50
0 ms212 KiB
#include <cstdio> char c[101][101], x; int n, m, i, j; int main() { scanf("%d%d", &m, &n); for (i = 0; i < m; i++) { for (j = 0; j < n; j++) { scanf(" %c", &x); if (x == '#') c[i][j] = c[i + 1][j] = c[i][j + 1] = c[i + 1][j + 1] = '#'; else if (c[i][j] != '#') c[i][j] = '.'; } } for (i = 0; i < m; i++) printf("%s\n", c[i]); return 0; }

Compilation message (stderr)

bold.cpp: In function 'int main()':
bold.cpp:5:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    5 |     scanf("%d%d", &m, &n);
      |     ~~~~~^~~~~~~~~~~~~~~~
bold.cpp:8:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    8 |             scanf(" %c", &x);
      |             ~~~~~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...