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"
using namespace std;
long long count_tastiness(long long x, vector<long long> a)
{
int k = a.size();
long long ret = 1, con = 1, cnt = 0;
for(int i = 0; i < k; ++i)
{
cnt += a[i] * con;
if(cnt / x < 2 * con - 1)
{
ret *= cnt / x + 1;
con = 1;
cnt = 0;
}
else con *= 2;
}
ret *= cnt / x + 1;
return ret;
}
# | 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... |