Submission #837310

#TimeUsernameProblemLanguageResultExecution timeMemory
837310EntityPlanttBold (COCI21_bold)C++14
50 / 50
0 ms288 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...