# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
369863 | A_D | Football (info1cup20_football) | C++14 | 288 ms | 2156 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 int long long
#define ii pair<int,int>
#define F first
#define S second
#define du long double
using namespace std;
const int N=1e6+100;
int a[N];
int n;
bool solve(int k)
{
if(k==0)return 0;
int sum=0;
for(int i=1;i<=n;i++){
sum+=a[i];
}
for(int i=1;i<=n;i++)a[i]/=2;
if(sum&1)return 1;
else return solve(k/2);
}
void qqqq()
{
int k;
cin>>n>>k;
for(int i=1;i<=n;i++){
scanf("%lld",&a[i]);
}
cout<<solve(k);
}
main()
{
int t;
cin>>t;
while(t--)qqqq();
}
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... |