# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
390884 | AlexPop28 | Packing Biscuits (IOI20_biscuits) | C++14 | 1091 ms | 332 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;
int n;
long long Solve(int i, vector<long long> cnt) {
if (i == (int)cnt.size()) {
return 1LL;
}
if (cnt[i] > n + 1) {
if (i + 1 == (int)cnt.size()) {
cnt.emplace_back(0LL);
}
auto delta = (cnt[i] - n) / 2;
cnt[i + 1] += delta;
cnt[i] -= delta;
}
if (cnt[i] < n) {
return Solve(i + 1, cnt);
}
long long ret = Solve(i + 1, cnt);
if (i + 1 == (int)cnt.size()) {
cnt.emplace_back(0LL);
}
cnt[i + 1] += cnt[i] / 2;
ret += Solve(i + 1, cnt);
# | 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... |