# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1027514 | vjudge1 | Football (info1cup20_football) | C++17 | 2075 ms | 1048576 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
void f(){
#ifndef ONLINE_JUDGE
freopen("in.txt", "r", stdin);
freopen("out.txt", "w", stdout);
#endif
}
int k;
int solve(vector<int> a, int b){
int n=a.size(), s=0;
if(b>k) return 0;
for(auto i: a) cin >> i, s+=i;
if(s%2) return 1;
else if(s==0) return 0;
else{
for(int i=0; i<n; i++){
a[i]/=2;
}
return 0;
}
}
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
//f();
srand(time(0));
int t; cin >> t;
while(t--){
int n; cin >> n >> k;
vector<int> a(n);
for(auto &i: a) cin >> i;
cout<<solve(a, 1);
}
}
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... |