#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 time |
Memory |
Grader output |
1 |
Execution timed out |
1016 ms |
348 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1010 ms |
348 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1055 ms |
348 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1016 ms |
348 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |