제출 #303475

#제출 시각아이디문제언어결과실행 시간메모리
303475tutis비스킷 담기 (IOI20_biscuits)C++17
9 / 100
1097 ms384 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...