Submission #620492

#TimeUsernameProblemLanguageResultExecution timeMemory
6204928e7Packing Biscuits (IOI20_biscuits)C++17
0 / 100
2 ms340 KiB
//Challenge: Accepted #include <bits/stdc++.h> using namespace std; #ifdef zisk void debug(){cout << endl;} template<class T, class ... U> void debug(T a, U ... b){cout << a << " ", debug(b...);} template<class T> void pary(T l, T r){ while (l != r) cout << *l << " ", l++; cout << endl; } #else #define debug(...) 0 #define pary(...) 0 #endif #define ll long long #define maxn 100005 #define pii pair<int, int> #define ff first #define ss second #include "biscuits.h" long long count_tastiness(long long x, std::vector<long long> a) { int k = a.size(); vector<ll> v; v.push_back(0); for (int i = 0;i < k;i++) { for (ll &j:v) j += a[i]; int tmp = v.size(); for (int j = 0;j < tmp;j++) { if (v[j] >= x) v.push_back(v[j] - x); } for (ll &j:v) j /= 2; } return v.size(); }
#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...