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) {
vector<long long> D(62, 1);
a.resize(62);
for (int i = 1; i < 62; i++) {
a[i] = (a[i] << i) + a[i - 1];
long long n = (1e18);
for (int j = i - 1; j > -1; j--) {
n = min(n, a[j]);
if (x <= (n >> j)) D[i] += D[j], n -= (x << j);
}
}
return D.back();
}
# | 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... |