# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
672786 | tbzard | Packing Biscuits (IOI20_biscuits) | C++14 | 1119 ms | 1051128 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>
using namespace std;
long long count_tastiness(long long x, vector<long long> a){
long double b = 1, sum = 0;
vector<long double> ans;
ans.push_back(0);
for(int i=0;i<100;i++){
if(i<a.size()) sum += b*a[i];
int m = upper_bound(ans.begin(), ans.end(), sum/x-b)-ans.begin()-1;
for(int j=0;j<=m;j++) ans.push_back(ans[j]+b);
b*=2;
}
return (long long)ans.size();
}
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... |