Submission #432474

#TimeUsernameProblemLanguageResultExecution timeMemory
432474MOUF_MAHMALATPacking Biscuits (IOI20_biscuits)C++14
0 / 100
1089 ms1100 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(log(p[lg[i]])>=log(i)+log(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...