# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
581729 | joelau | Packing Biscuits (IOI20_biscuits) | C++14 | 82 ms | 340 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.
#include "biscuits.h"
#include <bits/stdc++.h>
using namespace std;
vector<long long> A;
long long count_tastiness(long long x, vector<long long> a) {
while (a.size() < 20) a.push_back(0);
long long ans = 0;
for (long long i = 0; i*x <= 100000; ++i) {
A = a;
bool can = true;
for (long long j = 0; j < A.size() && can; ++j) {
if (i & (1ll<<j)) {
if (A[j] >= x) A[j] -= x;
else can = false;
}
if (j != A.size()-1) A[j+1] += A[j]/2;
}
if (can) 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... |