Submission #432457

#TimeUsernameProblemLanguageResultExecution timeMemory
432457MOUF_MAHMALATPacking Biscuits (IOI20_biscuits)C++14
0 / 100
127 ms1148 KiB
#include "biscuits.h" #include<bits/stdc++.h> using namespace std; typedef long long ll; vector<ll>a; ll x,n=61,lg[100009],p[65]; long long count_tastiness(ll X, vector<ll> A) { x=X,a=A,a.resize(n); if(lg[2]==0) { for(ll i=2; i<=1e5; i++) lg[i]=lg[i/2]+1; } p[0]=a[0]; for(ll i=1; i<n; i++) p[i]=p[i-1]+((1LL<<i)*a[i]); ll ans=0; for(ll i=1; i<=1e5; i++) if(p[lg[i]]>=i*x) ans++; return ans+1; }
#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...