Submission #525388

#TimeUsernameProblemLanguageResultExecution timeMemory
525388dron_rpFootball (info1cup20_football)C++14
26 / 100
2076 ms300 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(){ int t; cin >> t; while (t--){ int n, k, x; cin >> n >> k; int sum = 0; if (k == 1){ ll sum = 0; for (int i = 0; i<n; i++){ cin >> x; sum += x; } cout << (sum%2 == 0 ? "0" : "1"); } else{ cout << "0"; } } }

Compilation message (stderr)

football.cpp: In function 'int main()':
football.cpp:12:7: warning: unused variable 'sum' [-Wunused-variable]
   12 |   int sum = 0;
      |       ^~~
#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...