Submission #377784

#TimeUsernameProblemLanguageResultExecution timeMemory
377784autumn_eelPacking Biscuits (IOI20_biscuits)C++14
9 / 100
1084 ms512 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) { 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...