Submission #1051726

#TimeUsernameProblemLanguageResultExecution timeMemory
1051726aykhnPacking Biscuits (IOI20_biscuits)C++17
9 / 100
1070 ms432 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; long long x, k; vector<long long> a, pre; long long cnt(long long ind, long long s) { if (ind == 60) return 1; if (ind < k) s += (a[ind] << ind); long long 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...