| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 921476 | ksujay2 | Packing Biscuits (IOI20_biscuits) | C++17 | 32 ms | 1372 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;
using ll = long long;
const int MXK = 60;
ll count_tastiness(ll x, vector<ll> a) {
a.resize(MXK, 0);
vector<ll> f(MXK + 1);
f[0] = 1;
for(int i = 0; i < MXK; i++) {
ll sm = 0;
ll prev = 0;
ll mx = 0;
for(int j = i; j >= 0; j--) {
// f[j] to f[i] transition
sm += a[j] * (1LL << j);
mx ^= 1LL << (i - j);
ll nw = min((sm / x) >> j, mx);
f[i + 1] += f[j] * max(0ll, nw + 1 - prev);
prev = 2ll * max(prev, nw + 1);
}
}
return f[MXK];
}
| # | 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... | ||||
