Submission #465294

#TimeUsernameProblemLanguageResultExecution timeMemory
465294rainboyBaza (COCI17_baza)C11
50 / 50
120 ms8932 KiB
#include <stdio.h> #define N 1000 #define M 1000 int main() { static int aa[N][M], bb[M]; int n, m, q, i, j; scanf("%d%d", &n, &m); for (i = 0; i < n; i++) for (j = 0; j < m; j++) scanf("%d", &aa[i][j]); scanf("%d", &q); while (q--) { int cnt; for (j = 0; j < m; j++) scanf("%d", &bb[j]); cnt = 0; for (i = 0; i < n; i++) { int match = 1; for (j = 0; j < m; j++) if (bb[j] != -1 && aa[i][j] != bb[j]) { match = 0; break; } if (match) cnt++; } printf("%d\n", cnt); } return 0; }

Compilation message (stderr)

baza.c: In function 'main':
baza.c:10:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |  scanf("%d%d", &n, &m);
      |  ^~~~~~~~~~~~~~~~~~~~~
baza.c:13:4: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   13 |    scanf("%d", &aa[i][j]);
      |    ^~~~~~~~~~~~~~~~~~~~~~
baza.c:14:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   14 |  scanf("%d", &q);
      |  ^~~~~~~~~~~~~~~
baza.c:19:4: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   19 |    scanf("%d", &bb[j]);
      |    ^~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...