Submission #606527

#TimeUsernameProblemLanguageResultExecution timeMemory
606527MherPacking Biscuits (IOI20_biscuits)C++14
42 / 100
1044 ms16664 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; long long n; long long lg; long long ans = 0; map<long long, long long> dp[2]; long long count_tastiness(long long x, vector<long long> a) { for(int i = 0; i < 66;i++){ a.push_back(0); } ans = 0; n = a.size(); dp[0][0] = 1; for(int i = 0; i < n; i++){ for(auto c : dp[0]){ if(c.first + a[i] - x >= 0){ dp[1][(c.first + a[i] - x) / 2]+= c.second; } dp[1][(c.first + a[i]) / 2] += c.second; } dp[0] = dp[1]; dp[1].clear(); } ans = dp[0][0]; dp[0].clear(); return ans; }
#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...