Submission #1145244

#TimeUsernameProblemLanguageResultExecution timeMemory
1145244KerimFootball (info1cup20_football)C++20
100 / 100
24 ms328 KiB
#include "bits/stdc++.h" using namespace std; int main(){ // freopen("file.in", "r", stdin); int t; scanf("%d", &t); while (t--){ int n, k, y = 0; scanf("%d%d", &n, &k); while (n--){ int x; scanf("%d", &x); y ^= x; } int ans = 0; for (int i = 0; (1<<i) <= k; i++) if (y>>i&1) ans = 1; printf("%d", ans); } puts(""); }

Compilation message (stderr)

football.cpp: In function 'int main()':
football.cpp:8:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    8 |     scanf("%d", &t);
      |     ~~~~~^~~~~~~~~~
football.cpp:11:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   11 |         scanf("%d%d", &n, &k);
      |         ~~~~~^~~~~~~~~~~~~~~~
football.cpp:14:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   14 |             scanf("%d", &x);
      |             ~~~~~^~~~~~~~~~
#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...