제출 #377790

#제출 시각아이디문제언어결과실행 시간메모리
377790autumn_eel비스킷 담기 (IOI20_biscuits)C++14
21 / 100
1079 ms63340 KiB
#include "biscuits.h" #include <bits/stdc++.h> #define rep(i,n)for(int i=0;i<int(n);i++) using namespace std; typedef long long ll; long long count_tastiness(long long x, std::vector<long long> a) { //~ if(x==1){ a.resize(61); vector<map<ll,ll>>dp(61); dp[0][0]=1; rep(i,60){ for(auto&p:dp[i]){ ll c=p.first+a[i]; //use if(c>=x)dp[i+1][(c-x)/2]+=p.second; //don't use dp[i+1][c/2]+=p.second; } } ll ans=0; for(auto&p:dp[60]){ ans+=p.second; } return ans; //~ } //~ ll sum=0; //~ rep(i,a.size()){ //~ sum+=(1LL<<i)*a[i]; //~ } //~ ll ans=0; //~ for(ll i=0;i<=sum;i++){ //~ auto b=a; //~ b.resize(61); //~ bool ok=true; //~ for(int j=0;j<60;j++){ //~ if(i>>j&1){ //~ if(b[j]<x){ok=false;break;} //~ b[j]-=x; //~ } //~ b[j+1]+=b[j]/2; //~ } //~ if(ok)ans++; //~ } //~ 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...