Submission #581937

#TimeUsernameProblemLanguageResultExecution timeMemory
581937joelauPacking Biscuits (IOI20_biscuits)C++14
9 / 100
1094 ms340 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; long long X; vector<long long> A; long long f(long long n) { if (n == 60) return 1; A[n+1] += A[n]/2; long long ans = f(n+1); A[n+1] -= A[n]/2; if (A[n] >= X) { A[n] -= X, A[n+1] += A[n]/2; ans += f(n+1); A[n+1] -= A[n]/2, A[n] += X; } return ans; } long long count_tastiness(long long x, vector<long long> a) { while (a.size() < 60) a.push_back(0); X = x, A = a; return f(0); }
#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...