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"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
vector<ll int> a;
ll int x;
ll int recur(int pos, ll int carry) {
if (pos == 60) return 1;
ll int cur = carry + a[pos];
if (cur < x) return recur(pos + 1, (cur >> 1));
else return recur(pos + 1, (cur >> 1)) + recur(pos + 1, ((cur - x) >> 1));
}
ll int count_tastiness(ll int x_, vector<ll int> a_) {
a = a_; x = x_; a.resize(60);
return recur(0, 0);
}
# | 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... |