# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
834063 | faruk | Packing Biscuits (IOI20_biscuits) | C++17 | 1049 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>
#define all(a) a.begin(), a.end()
using namespace std;
typedef long long ll;
const ll maxsum = 1e5+1;
long long count_tastiness(long long x, std::vector<long long> a) {
ll out = 0;
a.resize(61);
for (int val = 0; val < maxsum; val++) {
vector<ll> curr = a;
int num = 0;
bool ok = true;
for (ll a = 0; a < curr.size(); a++) {
num += curr[a];
if ((val & (1LL <<a)) != 0)
{
if (num < x)
ok = false;
else
num -= x;
}
num /= 2;
}
if (ok)
out++;
}
return out;
}
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... |