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 < 2 * con)
{
ret *= (cnt + 1);
con = 1;
cnt = 0;
}
else con *= 2;
}
ret *= (cnt + 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... |