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;
typedef long long ll;
long long count_tastiness(long long X, std::vector<long long> a) {
while(a.size()<60) a.push_back(0);
vector<ll> good; // set of good y's
good.push_back(0);
ll sum=0;
for(int b=0;b<60;b++) {
ll c=1LL<<b;
sum+=a[b]*c;
int s=good.size();
for(int i=0;i<s;i++) {
ll y=good[i]+c;
if(y<=sum/X)
good.push_back(y);
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... |