# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
405790 | ly20 | Packing Biscuits (IOI20_biscuits) | C++17 | 1088 ms | 332 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;
const int MAXN = 40, INF = 1e9;
int mc[MAXN];
long long count_tastiness(long long x, vector<long long> a) {
long long resp = 0;
for(int j = 0; j <= 100000; j++) {
for(int i = 0; i < a.size(); i++) {
mc[i] = a[i];
}
bool ok = true;
for(int i = 0; i < 32; i++) {
if((1 << i) & j) {
if(mc[i] < x) {
ok = false;
break;
}
mc[i] -= x;
}
mc[i + 1] += mc[i] / 2;
}
if(ok) resp++;
}
return resp;
}
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... |