Submission #693269

#TimeUsernameProblemLanguageResultExecution timeMemory
693269auslanderFootball (info1cup20_football)C++17
26 / 100
72 ms852 KiB
#include <iostream> typedef long long ll; using namespace std; ll arr[100005]; void solve() { ll i, j, k, n, m; m = 0; cin >> n >> k; for (i = 0; i < n; i++) { cin >> arr[i]; m += arr[i]; } if (k == 1) { if (m % 2) cout << 1; else cout << 0; } } int main() { int t; cin >> t; while (t--) solve(); return 0; }

Compilation message (stderr)

football.cpp: In function 'void solve()':
football.cpp:8:8: warning: unused variable 'j' [-Wunused-variable]
    8 |  ll i, j, k, n, m;
      |        ^
#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...