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;
long long count_tastiness(long long x, vector<long long> a){
long long ans = 0;
for(int i=0;i<=100000;i++){
long long sum = 0;
bool ok = 1;
for(int j=0;j<60;j++){
if(j < (int)a.size()){
sum += a[j];
}
if((i>>j)&1) sum-=x;
if(sum < 0){
ok = 0;
break;
}
sum /= 2;
}
if(ok) ans++;
}
return ans;
}
# | 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... |