Submission #597565

#TimeUsernameProblemLanguageResultExecution timeMemory
597565Jarif_RahmanPacking Biscuits (IOI20_biscuits)C++17
9 / 100
1079 ms296 KiB
#include "biscuits.h" #include <bits/stdc++.h> #define pb push_back #define f first #define sc second using namespace std; typedef long long int ll; typedef string str; const int K = 60; ll count_tastiness(ll X, vector<ll> A){ while(A.size() != K) A.pb(0); A.pb(0); ll ans = 0; function<void(int)> bf = [&](int in){ if(in == K){ ans++; return; } if(A[in] >= X){ A[in+1]+=(A[in]-X)/2; bf(in+1); A[in+1]-=(A[in]-X)/2; } A[in+1]+=A[in]/2; bf(in+1); A[in+1]-=A[in]/2; }; bf(0); return ans; }
#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...