Submission #826507

#TimeUsernameProblemLanguageResultExecution timeMemory
826507rainboyFootball (info1cup20_football)C11
50 / 100
28 ms1928 KiB
#include <stdio.h> int main() { int t; scanf("%d", &t); while (t--) { int n, k, a, x, y; scanf("%d%d", &n, &k); x = 0, y = 0; while (n--) { scanf("%d", &a); if ((a & 1) != 0) x ^= 1; if ((a & 2) != 0) y ^= 1; } if (k == 1) printf(x ? "1" : "0"); else printf(x || y ? "1" : "0"); } printf("\n"); return 0; }

Compilation message (stderr)

football.c: In function 'main':
football.c:6:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
    6 |  scanf("%d", &t);
      |  ^~~~~~~~~~~~~~~
football.c:10:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |   scanf("%d%d", &n, &k);
      |   ^~~~~~~~~~~~~~~~~~~~~
football.c:13:4: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   13 |    scanf("%d", &a);
      |    ^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...