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;
using ll = long long;
const ll K = 61, MX = 1e5 + 1;
long long count_tastiness(long long x, std::vector<long long> a) {
ll running_sum = 0, cur_ans = 1, k = a.size();
for(ll i = 0; i < k; ++i) {
if(running_sum + 1 < (1 << i)) {
cur_ans *= a[i];
running_sum += (a[i] << i);
}
else {
cur_ans += a[i] << i;
}
}
return cur_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... |