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;
#define ar array
typedef long long ll;
//~ #defien int ll
ll count_tastiness(ll x, vector<ll> a) {
int k = 60;
a.resize(k);
map<ll, ll> mm;
mm[0]++;
for(int i=0;i<k;i++){
map<ll, ll> tt;
for(auto [x, t] : mm){
tt[x + a[i]] = t;
}
mm = tt;
for(auto [rem, t] : tt){
if(rem >= x) mm[rem - x] += t;
}
tt = mm;
mm.clear();
for(auto [rem, t] : tt){
mm[rem / 2] += t;
}
}
ll res = 0;
for(auto [x, y] : mm) res += y;
return res;
}
# | 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... |