# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
400000 | 2021-05-07T03:25:54 Z | faresbasbs | Packing Biscuits (IOI20_biscuits) | C++14 | 1 ms | 332 KB |
#include <bits/stdc++.h> #include "biscuits.h" using namespace std; map<pair<int,long long>,long long> dp; vector<long long> a; int x; long long ans(int curr , long long val){ if(curr == a.size()){ return 1; } val += a[curr]; if(dp.find({curr,val}) != dp.end()){ return dp[{curr,val}]; } long long ret = ans(curr+1,val/2); if(val >= x){ ret += ans(curr+1,(val-x)/2); } return dp[{curr,val}] = ret; } long long count_tastiness(long long X , vector<long long> A){ dp.clear(); a = A , x = X; return ans(0,0); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 332 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 332 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |