# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
311178 | GioChkhaidze | Football (info1cup20_football) | C++14 | 39 ms | 2176 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>
#define ll long long
#define pb push_back
#define F first
#define S second
using namespace std;
const int N=2e5+5;
int n,k,a[N];
void solve() {
cin>>n>>k;
for (int i=1; i<=n; i++)
cin>>a[i];
bool ko=false;
while (k) {
ll s=0;
for (int i=1; i<=n; i++)s+=a[i];
if (s%2==1) { ko=true; break; }
for (int i=1; i<=n; i++) a[i]/=2;
k/=2;
}
if (ko)
cout<<1;
else
cout<<0;
}
main() {
ios::sync_with_stdio(false);
cin.tie(NULL),cout.tie(NULL);
int t;
cin>>t;
while (t--) {
solve();
}
}
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... |