제출 #432449

#제출 시각아이디문제언어결과실행 시간메모리
432449Hazem비스킷 담기 (IOI20_biscuits)C++14
0 / 100
163 ms15252 KiB
#include "biscuits.h" #include <bits/stdc++.h> #define LL long long using namespace std; LL x; vector<LL>a; map<pair<int,LL>,LL>dp; LL bt(int i,LL cur){ if(i==60) return 1; if(dp.find({i,cur})!=dp.end()) return dp[{i,cur}]; LL ret = 0; ret += bt(i+1,(cur+a[i])/2); if(cur+a[i]>=x) ret += bt(i+1,(cur+a[i]-x)/2); return dp[{i,cur}] = ret; } long long count_tastiness(long long X, std::vector<long long> A) { x = X;a = A; while(a.size()<=60) a.push_back(0); return bt(0,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...