#include "biscuits.h"
//#include "grader.cpp"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pii pair<int,int>
#define f first
#define s second
#define all(x) x.begin(),x.end()
#define _ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
long long count_tastiness(long long x, std::vector<long long> a) {
while((int)a.size()<60) a.push_back(0);
vector<ll> ans={0};
ll sum=0;
for(int i=0;i<60;i++){
sum+=a[i]*(1ll<<i);
int pos=0;
while(pos<(int)ans.size() and (ans[pos]+(1ll<<i))<=(sum/x)){
ans.push_back(ans[pos]+(1ll<<i));
pos++;
}
}
return (ll)ans.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... |