# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
581977 | joelau | Packing Biscuits (IOI20_biscuits) | C++14 | 1144 ms | 1169096 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;
vector<long long> ans;
long long count_tastiness(long long x, vector<long long> a) {
while (a.size() < 60) a.push_back(0);
ans = {0};
long long sum = 0;
for (long long i = 0; i < a.size(); ++i) {
sum += a[i] * (1ll<< i);
long long n = ans.size();
for (long long j = 0; j < n && ((sum-ans[j]*x)>>i) >= x; ++j) ans.push_back(ans[j]+(1ll<<i));
}
return 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... |