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>
#include "biscuits.h"
using namespace std;
vector<long long> a,dp,dp2;
long long x;
long long count_tastiness(long long X , vector<long long> A){
a = A , x = X;
while(a.size() < 60){
a.push_back(0ll);
}
dp = {0};
for(int i = 0 ; i < 60 ; i += 1){
dp2.clear();
for(auto j : dp){
j += a[i];
dp2.push_back(j/2);
if(j >= x){
dp2.push_back((j-x)/2);
}
}
swap(dp,dp2);
}
return dp.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... |