This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#pragma GCC optimize("Ofast","unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int LIMIT = 59;
long long count_tastiness(long long x, std::vector<long long> a) {
a.resize(LIMIT+1);
vector<int> pos = {0};
for(int i=0;i<=LIMIT;i++){
int curr = pos.size();
for(int j=0;j<curr;j++){
pos[j]+=a[i];
if(pos[j]>=x)pos.emplace_back(pos[j]-x);
}
for(int&j:pos)j/=2;
}
return pos.size();
}
# | 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... |