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 "biscuits.h"
long long count_tastiness(long long x, std::vector<long long> a) {
long long ans = 0;
while(a.size() < 20) a.push_back(0);
for(int mask = 0; mask <= 100000; mask++) {
long long tem = 0;
bool ok = 1;
for(int b = 0; b < 20; b++) {
tem += a[b];
if(mask&(1<<b)) {
if(tem >= x) tem -= x;
else {ok = 0; break;}
}
tem >>= 1;
}
ans += ok;
}
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... |