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 = 1;
vector<long long> b(101, 0ll);
for(int i = 0; i < 100; i++){
if(i < (int)a.size())b[i] += a[i];
b[i + 1] += (b[i] - 1ll) / 2;
b[i] = min(b[i], 1ll);
}
for(int i = 0; i < 100; i++){
if(b[i] > 0ll)ans += 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... |