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"
using L = long long;
constexpr int N = 128;
L a[N], x;
int dfs(size_t i = 0, L z = 0)
{
if (!(a[i] + z))
return 1;
int ans = dfs(i + 1, (a[i] + z) >> 1);
if (a[i] + z >= x)
ans += dfs(i + 1, (a[i] + z - x) >> 1);
return ans;
}
L count_tastiness(L x_, std::vector<L> a_)
{
x = x_;
copy(a_.begin(), a_.end(), a);
return dfs();
}
# | 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... |