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 int long long
using namespace std;
int t[300000];
int32_t main()
{
cin.tie(0);
cout.tie(0);
ios_base::sync_with_stdio(0);
int zap;
cin>>zap;
while(zap--)
{
int n,k;
cin>>n>>k;
for(int i=1;i<=n;i++)
cin>>t[i];
int git=0;
for(int j=1;j<=k;j*=2)
{
int suma=0;
for(int i=1;i<=n;i++)
suma+=(t[i]%2);
if(suma%2==1)
{
git=1;
break;
}
for(int i=1;i<=n;i++)
t[i]/=2;
}
cout<<git;
}
return 0;
}
# | 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... |