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>
using namespace std;
long long count_tastiness(long long x, vector<long long> a) {
long long ans = 1;
long long curr = 0, lst = -1;
for(int i = 0; i < (int) a.size(); i++) {
if(curr < (1LL << (i - lst)))
ans *= (curr + 1), curr = 0, lst = i;
curr += (1LL << (i - lst)) * a[i];
}
ans *= (curr + 1);
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... |