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;
#include "biscuits.h"
#define int long long
long long count_tastiness(long long x, std::vector<long long> a) {
	a.resize(max((int)a.size(), 61ll), 0); int k = a.size();
	vector<int> s(k,0);
	s[0] = a[0];
	for (int i = 1; i < k; i++) {
		s[i] = s[i - 1] + a[i] * (1ll<<i);
	}
	vector<int> good = {0};
	for (int i=0; i<61; i++) {
		int nw = good.size();
		for (int j=0;  j<nw;  j++) {
			if ((good[j]+(1ll<<i)) <= s[i]/x) good.push_back(good[j] + (1ll<<i));
			else break;
		}
	}
	return good.size();
}
| # | 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... |