# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
996347 | Rifal | Packing Biscuits (IOI20_biscuits) | C++14 | 1066 ms | 412 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, std::vector<long long> a) {
long long ans = 0;
int siz = a.size();
for(long long i = 0; i <= 200000; i++) {
long long cur[100] = {};
for(int j = 0; j < siz; j++) cur[j] = a[j];
bool ok = true;
for(long long j = 0; j < 60; j++) {
if((i&(1ll<<j)) > 0) {
if(cur[j] >= x) {
cur[j] -= x;
}
else {
ok = false; break;
}
}
if(ok == false) break;
cur[j+1] += (cur[j]/2ll);
}
if(ok) {
ans++;
}
}
return ans;
}
# | 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... |