Submission #306072

#TimeUsernameProblemLanguageResultExecution timeMemory
306072SorahISAPacking Biscuits (IOI20_biscuits)C++17
12 / 100
10 ms1024 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; #define int long long using pii = pair<int, int>; template<typename T> using Prior = priority_queue<T>; template<typename T> using prior = priority_queue<T, vector<T>, greater<T>>; #define X first #define Y second #define ALL(x) (x).begin(), (x).end() #define eb emplace_back #define pb push_back long long count_tastiness(long long x, vector<long long> a) { int k = a.size(); int ans = 1, sum = 0, lst = 0; for (int i = 0; i < k; ++i) { if (sum < x * ((1LL << i) - 1)) ans *= ((sum / x) >> lst) + 1, lst = i; sum += (1LL << i) * a[i]; } ans *= ((sum / x) >> lst) + 1; 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...