제출 #826512

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

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

football.c: In function 'main':
football.c:16:20: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
   16 |   printf(x & k * 2 - 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...