# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
525179 | maks007 | Football (info1cup20_football) | C++14 | 215 ms | 1404 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.
#include <bits/stdc++.h>
using namespace std;
#define int long long
int32_t main(void) {
int t;
cin >> t;
int countdown = 0;
while(t --){
int n, k;
cin >> n >> k;
vector <int> a(n);
function <int()> check=[&]() {
int cnt = 0;
for(int i = 0; i < n; i++) {
if(a[i] == 1 or a[i] == 0) cnt ++;
}
if(cnt == n) return 0;
else return 1;
};
for(int i = 0; i < n; i ++) cin >> a[i];
while(k > 0) {
int sum = accumulate(a.begin(), a.end(), 0ll);
for(int i = 0; i < n; i ++) a[i] >>= 1;
if(sum % 2 == 1) {
cout << 1;
goto end;
}
k /= 2;
}
cout << 0;
end:;
}
return false;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |