# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
773816 | t6twotwo | Packing Biscuits (IOI20_biscuits) | C++17 | 1068 ms | 23952 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;
using ll = long long;
ll count_tastiness(ll q, vector<ll> A) {
A.resize(61);
map<ll, ll> mp;
mp[0] = 1;
for (int i = 0; i < A.size(); i++) {
map<ll, ll> t;
for (auto [add, x] : mp) {
t[(A[i] + add) / 2] += x;
if (A[i] + add >= q) {
t[(A[i] + add - q) / 2] += x;
}
}
swap(mp, t);
}
ll ans = 0;
for (auto [_, x] : mp) {
ans += x;
}
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... |