이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "biscuits.h"
#include <bits/stdc++.h>
using namespace std;
long long count_tastiness(long long x, vector<long long> a)
{
while (!a.empty() && a.back() == 0)
a.pop_back();
if (a.empty())
return 1;
a.push_back(0);
long long k = a[0];
a.erase(a.begin());
long long ret = 0;
a[0] += k / 2;
ret += count_tastiness(x, a);
a[0] -= k / 2;
if (k >= x)
{
k -= x;
a[0] += k / 2;
ret += count_tastiness(x, a);
a[0] -= k / 2;
}
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... |