# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
305714 | arthurconmy | Packing Biscuits (IOI20_biscuits) | C++14 | 1080 ms | 384 KiB |
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(b >= A.size()) w=0;
else
{
if(curA[b] < x) w=0;
else curA[b] -= x;
}
}
if(i+1 < A.size()) curA[i+1] += ll(curA[i]/2LL);
}
if(w) ans++;
}
return ans;
}
Compilation message (stderr)
# | 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... |