Submission #1023513

#TimeUsernameProblemLanguageResultExecution timeMemory
1023513Ahmed_SolymanPacking Biscuits (IOI20_biscuits)C++14
9 / 100
173 ms600 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll count_tastiness(ll x,vector<ll> a){ if(x>100000)return 1; int k=(int)a.size(); vector<ll>g=a; int ret=0; for(int y=0;y<=100000/x+5;y++){ a=g; int cnt=0; for(int j=0;j<x;j++){ ll u=y; for(int p=k-1;p>=0;p--){ ll t=min(a[p],u/(1LL<<p)); a[p]-=t; u-=t*(1LL<<p); } if(!u)++cnt; } ret+=(cnt==x); } return ret; }
#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...