# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1012744 | kachim2 | Football (info1cup20_football) | C++17 | 29 ms | 2140 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;
bool sol(){
int n;
int k, kk = 1;
cin >> n;
cin >> k;
vector<int> a(n);
for(int i = 0; i < n; i++) cin >> a[i];
int acc = accumulate(a.begin(), a.end(), 0);
while(acc!=0 && kk <=k){
if(acc&1) return 1;
for(int &i : a) i/=2; kk*=2;
acc = accumulate(a.begin(), a.end(), 0);
}
return 0;
}
int main(){
cin.tie(0);
ios_base::sync_with_stdio(0);
cout.tie(0);
int t;
cin >> t;
for(int i = 0; i < t; i++){
cout << ((sol()) ? "1" : "0") ;//<< '\n';
}
}
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... |