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"
#define ll long long
ll D[61];
ll count_tastiness(ll x, std::vector<ll> a) {
D[0]=1;
a.resize(60);
for (int i=0;i<60;i++)
{
ll s=i?a[i]=(a[i]<<i)+a[i-1]:a[0];
D[i+1]=1;
for (int j=i;j>=0;j--)
{
s=s<a[j]?s:a[j];
if (x<=(s>>j))
D[i+1]+=D[j],s-=(x<<j);
}
}
return D[60];
}
# | 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... |