Submission #1015453

#TimeUsernameProblemLanguageResultExecution timeMemory
1015453UnforgettableplPacking Biscuits (IOI20_biscuits)C++17
9 / 100
1113 ms276300 KiB
// #pragma GCC optimize("Ofast","unroll-loops") #include <bits/stdc++.h> using namespace std; #define int long long const int LIMIT = 59; long long count_tastiness(long long x, std::vector<long long> a) { a.resize(LIMIT+1); set<int> pos = {0}; int sum = 0; for(int i=0;i<=LIMIT;i++){ sum+=(1ll<<i)*a[i]; auto iter = pos.upper_bound(sum/x - (1ll<<i)); while(iter!=pos.begin()){ iter--; pos.insert(*iter + (1ll<<i)); } } return pos.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...