제출 #602246

#제출 시각아이디문제언어결과실행 시간메모리
602246PiejanVDC비스킷 담기 (IOI20_biscuits)C++17
42 / 100
1101 ms49828 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; long long X; vector<long long>v; unordered_map<long long, long long>mp[61]; long long dp(int i, long long cnt) { if(i == 61) return 1; if(mp[i].count(cnt)) return mp[i][cnt]; long long ret = 0; if(cnt + v[i] >= X) ret = dp(i+1, (cnt + v[i] - X)/2); ret += dp(i+1, (cnt+v[i])/2); return mp[i][cnt] = ret; } long long count_tastiness(long long x, vector<long long>a) { X = x; v = a; for(int i = a.size() ; i < 61 ; i++) v.push_back(0); for(int i = 0 ; i < 61 ; i++) mp[i].clear(); return dp(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...