This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#ifndef ARTHUR_LOCAL
#include "biscuits.h"
#endif
#ifdef ARTHUR_LOCAL
#include <bits/stdc++.h>
#endif
using namespace std;
using ll = long long;
ll count_tastiness(ll x, vector<ll> A)
{
ll ans = 0LL;
for(int i=0; i<=100000; i++)
{
vector<ll> curA = A;
bool w=1;
for(int b=0; b<20; b++)
{
if((i & (1<<b)) != 0)
{
if(curA[i] < x) w=0;
else curA[i] -= x;
}
curA[i+1] += ll(curA[i]/2LL);
}
if(w) ans++;
}
return ans;
}
# | 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... |