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>
#include "biscuits.h"
using namespace std;
long long count_tastiness(long long x, vector<long long> a) {
int k = a.size();
long long ans = 0;
for(int y=0; y<=100000; ++y) {
auto b = a;
bool yes = true;
for(int i=0; i<k; ++i) {
if(y >> i & 1) {
yes &= b[i] >= x;
b[i] -= x;
}
if(i<k-1)
b[i+1] += b[i] / 2;
}
ans += yes;
}
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... |