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"
#define pb push_back
#include <bits/stdc++.h>
using namespace std;
long long count_tastiness(long long x, std::vector<long long> a) {
long long k=(long long)a.size();
vector<vector<long long>> c;
vector<long long> d(k,0);
c.pb(d);
for(long long i=0;i<k;i++){
long long sz=(long long)c.size();
for(long long j=0;j<sz;j++){
c[j][i]=a[i];
if(i){
c[j][i]+=c[j][i-1]/2;
}
if(c[j][i]>=x){
c[j][i]-=x;
c.pb(c[j]);
c[j][i]+=x;
}
}
}
long long res=(long long)c.size();
return res;
}
# | 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... |