Submission #1051724

#TimeUsernameProblemLanguageResultExecution timeMemory
1051724aykhnPacking Biscuits (IOI20_biscuits)C++17
9 / 100
1077 ms428 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; long long x, k; vector<long long> a, pre; int cnt(int ind, int s) { if (ind == 60) return 1; if (ind < k) s += (a[ind] << ind); int res = 0; if (x <= (s >> ind) && (x << ind) <= s) res += cnt(ind + 1, s - (x << ind)); res += cnt(ind + 1, s); return res; } long long count_tastiness(long long X, vector<long long> A) { x = X, a = A, k = A.size(); return cnt(0, 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...