# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
416452 | SuhaibSawalha1 | Packing Biscuits (IOI20_biscuits) | C++17 | 1074 ms | 324 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;
long long count_tastiness(long long x, vector<long long> a) {
long long ans = 0;
for (int i = 0; i <= 100000; ++i) {
long long hv = 0;
bool ok = 1;
for (int j = 0; j < 20; ++j) {
hv /= 2;
if (j < a.size()) {
hv += a[j];
}
if (i >> j & 1) {
if (hv >= x) {
hv -= x;
}
else {
ok = 0;
break;
}
}
}
ans += ok;
}
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... |