제출 #826524

#제출 시각아이디문제언어결과실행 시간메모리
826524rainboyFootball (info1cup20_football)C11
100 / 100
30 ms1964 KiB
#include <stdio.h> int main() { int t; scanf("%d", &t); while (t--) { int n, k, k_, a, x; scanf("%d%d", &n, &k); x = 0; while (n--) { scanf("%d", &a); x ^= a; } k_ = 1; while (k_ <= k) k_ <<= 1; printf(x & k_ - 1 ? "1" : "0"); } printf("\n"); return 0; }

컴파일 시 표준 에러 (stderr) 메시지

football.c: In function 'main':
football.c:19:17: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
   19 |   printf(x & k_ - 1 ? "1" : "0");
      |              ~~~^~~
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...