Submission #830544

#TimeUsernameProblemLanguageResultExecution timeMemory
830544amunduzbaevPacking Biscuits (IOI20_biscuits)C++17
21 / 100
1094 ms16668 KiB
#include "biscuits.h" #include "bits/stdc++.h" using namespace std; #define ar array typedef long long ll; //~ #defien int ll ll count_tastiness(ll x, vector<ll> a) { int k = 60; a.resize(k); map<ll, ll> mm; mm[0]++; for(int i=0;i<k;i++){ map<ll, ll> tt; for(auto [x, t] : mm){ tt[x + a[i]] = t; } mm = tt; for(auto [rem, t] : tt){ if(rem >= x) mm[rem - x] += t; } tt = mm; mm.clear(); for(auto [rem, t] : tt){ mm[rem / 2] += t; } } ll res = 0; for(auto [x, y] : mm) res += y; return res; }
#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...