Submission #805042

#TimeUsernameProblemLanguageResultExecution timeMemory
805042alvingogoPacking Biscuits (IOI20_biscuits)C++14
0 / 100
1065 ms22996 KiB
#include "biscuits.h" #include <bits/stdc++.h> #pragma GCC optimize("Ofast") #define fs first #define sc second #define p_q priority_queue using namespace std; typedef long long ll; ll count_tastiness(ll x, vector<ll> a) { map<ll,ll> dp; while(a.size()<=62){ a.push_back(0); } int n=a.size(); dp[0]=1; for(int i=0;i<n+60;i++){ map<ll,ll> dp2; for(auto h:dp){ dp2[h.fs/2+a[i]]+=h.sc; if(h.fs>=x){ dp2[(h.fs-x)/2+a[i]]+=h.sc; } } dp.swap(dp2); } ll ans=0; for(auto h:dp){ ans+=h.sc; } 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...