#include <bits/stdc++.h>
#include "biscuits.h"
using namespace std;
using ll = long long;
ll x;
ll sol(vector<ll> a, int mb) {
ll r=sol(a, mb-1);
a[mb]-=x;
for (int i=mb; i>=0; i--) {
if (i==0&&a[i]<0) return r;
if (a[i]>=0) break;
a[i-1]+=2*a[i], a[i]=0;
}
return r+sol(a, mb-1);
}
ll count_tastiness(ll x, vector<ll> a) {
::x=x;
return sol(a, 59);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1198 ms |
1445564 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1202 ms |
1515940 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1160 ms |
1467456 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1212 ms |
1541292 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1198 ms |
1445564 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |