Submission #358177

#TimeUsernameProblemLanguageResultExecution timeMemory
358177juggernautPacking Biscuits (IOI20_biscuits)C++14
21 / 100
1086 ms492 KiB
#include"biscuits.h" #include<bits/stdc++.h> #ifndef EVAL #include"grader.cpp" #endif using namespace std; typedef long long ll; ll count_tastiness(ll x,vector<ll>A){ if(x==1){ int k=A.size(); ll ans=1; for(int i=k-1;i>0;i--){ if(A[i-1]){ A[i-1]+=A[i]<<1ll; A[i]=0; } } for(int i=0;i<k;i++)ans*=(A[i]+1); return ans; }else{ ll cnt=0; A.resize(62); for(ll y=0;y<100001;y++){ vector<ll>a=A; bool flag=1; for(int i=0;i<61;a[i+1]+=a[i]>>1,i++) if(y>>i&1){ if(a[i]<x){ flag=0; break; } a[i]-=x; } cnt+=flag; } return cnt; } }
#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...