제출 #400005

#제출 시각아이디문제언어결과실행 시간메모리
400005faresbasbs비스킷 담기 (IOI20_biscuits)C++14
42 / 100
1088 ms15728 KiB
#include <bits/stdc++.h> #include "biscuits.h" using namespace std; map<long long,long long> dp,dp2; vector<long long> a; long long x; long long count_tastiness(long long X , vector<long long> A){ a = A , x = X; while(a.size() < 60){ a.push_back(0ll); } dp.clear(); dp[0ll] = 1; for(int i = 0 ; i < 60 ; i += 1){ dp2.clear(); for(auto j : dp){ long long p = j.first; p += a[i]; dp2[p/2] += j.second; if(p >= x){ dp2[(p-x)/2] += j.second; } } swap(dp,dp2); } long long ret = 0; for(auto i : dp){ ret += i.second; } return ret; }
#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...