# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
304618 | medmdg | Packing Biscuits (IOI20_biscuits) | C++14 | 2 ms | 384 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "biscuits.h"
using namespace std;
long long int count_tastiness(long long int x,vector<long long int> a){
vector<long long int> b;
int k=61;
bool an[k];
for(int i=0;i<a.size();i++)
b.push_back(a[i]);
for(int i=0;i<61;i++){
while(b.size()<=i){
b.push_back(0);
}
if(b[i]>=x){
an[i]=true;
b[i]-=x;
}else{
an[i]=false;
}
b[i+1]+=b[i]/2;
b[i]=0;
}
unsigned long long int ans=0;
for(int i=0;i<61;i++){
if(an[i])
ans+=1<<i;
}
return ans;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |