제출 #422304

#제출 시각아이디문제언어결과실행 시간메모리
422304Monchito비스킷 담기 (IOI20_biscuits)C++14
0 / 100
18 ms332 KiB
#include "biscuits.h" #include <map> using namespace std; using ll = long long; using mp = map<pair<int, ll>, ll>; vector<ll> A(200, 0); ll calc(int current_bit, ll val, mp& dp){ if(current_bit == 63) return 1; if(dp.find({current_bit, val}) != dp.end()) return dp[{current_bit, val}]; if(val == 0) return dp[{current_bit, val}] = calc(current_bit+1, A[current_bit+1], dp); return dp[{current_bit, val}] = calc(current_bit+1, A[current_bit+1] + val/2, dp) + calc(current_bit+1, A[current_bit+1] + (val-1)/2, dp); } ll count_tastiness(ll x, vector<ll> a) { mp dp; for(int i=0; i<(int)a.size(); i++) A[i] = a[i]; return calc(0, A[0], dp); }
#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...