Submission #524877

#TimeUsernameProblemLanguageResultExecution timeMemory
524877maks007Football (info1cup20_football)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define int long long int main(void) { int t; cin >> t; while(t --) { int n, k; cin >> n >> k; vector <int> a(n); for(int i = 0; i < n; i ++) cin >> a[i]; if(n == 1) { if(a[0] % 2 == 1) { cout << 1; }else cout << 0 ; continue; } if(k == 1) { int sum = accumulate(a.begin(), a.end(), 0ll); if(sum % 2 == 1) { cout << 1; }else cout << 0; continue; } int sum = count(a.begin(), a.end(), 1) + count(a.begin(), a.end(), 3); int move = count(a.begin(), a.end(), 2) + count(a.begin(), a.end(), 3); if(move % 2 == 0) { if(sum % 2 == 1) { cout << 1; }else cout << 0; }else { if(sum % 2 == 0) cout << 1; else cout << 0; } } return false; }

Compilation message (stderr)

cc1plus: error: '::main' must return 'int'