Submission #693267

#TimeUsernameProblemLanguageResultExecution timeMemory
693267auslanderFootball (info1cup20_football)C++17
0 / 100
74 ms948 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 << 2; } } 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...