Submission #921352

#TimeUsernameProblemLanguageResultExecution timeMemory
921352ksujay2Packing Biscuits (IOI20_biscuits)C++17
0 / 100
1055 ms348 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; ll count_tastiness(ll x, vector<ll> a) { int k = a.size(); function<ll(int, ll)> f = [&] (int i, ll y) { if(i < 0) return (ll)(y == 0); y = y - a[i] * (1LL << i); return f(i - 1, max(0ll, y)) + f(i - 1, max(0ll, y + x * (1LL << i))); }; return f(k - 1, 0); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...