# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
750955 | mohav48173 | Packing Biscuits (IOI20_biscuits) | C++14 | 1067 ms | 340 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 "biscuits.h"
#include<bits/stdc++.h>
using namespace std;
long long count_tastiness(long long x, vector<long long> a) {
while(a.size()<20)a.push_back(0);
int ans=0;
for(int i=0;i<=100000;i++) {
vector<int>corr;
int copyi=i;
while(copyi>0) {
corr.push_back(copyi&1);
copyi>>=1;
}
vector<long long>copya=a;
bool isgood=1;
for(int j=0;j<copya.size();j++) {
if(copya[j]==1 && a[j]<x){isgood=0;break;}
if(copya[j]==1)a[j]-=x;
a[j+1]+=a[j]/2;
}
ans+=isgood;
}
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... |