Submission #306016

#TimeUsernameProblemLanguageResultExecution timeMemory
306016eriksuenderhaufPacking Biscuits (IOI20_biscuits)C++17
9 / 100
1094 ms384 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; #define sz(x) (int)(x).size() void dfs(ll d, ll p, ll& ret, ll x, vector<ll>& a) { if (d > 60) return; p = p / 2 + (d < sz(a) ? a[d] : 0); dfs(d + 1, p, ret, x, a); if (p >= x) { ret++; dfs(d + 1, p - x, ret, x, a); } } ll count_tastiness(ll x, vector<ll> a) { ll ret = 1; dfs(0, 0, ret, x, a); return ret; }
#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...