# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1104876 | abushbandit_ | Football (info1cup20_football) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimize("Ofast,unroll-loops")
#include "bits/stdc++.h"
using namespace std;
#ifndef ONLINE_JUDGE
#include "debug.h"
#else
#define debug(...)
#define debugArr(...)
#endif
#define int long long
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define ff first
#define ss second
#define pb push_back
template<class T, class U> inline bool chmin(T& a, const U& b) { if (a > b) { a = b; return true; } return false; }
template<class T, class U> inline bool chmax(T& a, const U& b) { if (a < b) { a = b; return true; } return false; }
const int inf = 1e9;
const int mod = 1e9 + 7;
const int N = 1e5 + 5;
void solve() {
int n,k;
cin >> n >> k;
int a[n];
for(int i = 0;i < n;i++) cin >> a[i];
int xr = 0;
for(int i = 0;i < n;i++) {
xr = xr ^ a[i];
}
if(xr) cout << 1;
else cout << 0;
//~ cout << xr << "\n";
}
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);cout.tie(nullptr);
int t = 1;
cin >> t;
while(t--) {
solve();
}
}