#include "biscuits.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
vector<ll int> a;
ll int x;
ll int recur(int pos, ll int carry) {
if (pos == 60) return 1;
ll int cur = carry + a[pos];
if (cur < x) {
return recur(pos + 1, (cur >> 1));
} else {
return recur(pos + 1, (cur >> 1)) + recur(pos + 1, ((cur - x) >> 1));
}
}
ll int count_tastiness(ll int x_, vector<ll int> a_) {
a = a_; x = x_;
return recur(0, 0);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1082 ms |
212 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1083 ms |
212 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1096 ms |
212 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1093 ms |
340 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1082 ms |
212 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |