Submission #307709

#TimeUsernameProblemLanguageResultExecution timeMemory
307709CodePlatinaPacking Biscuits (IOI20_biscuits)C++14
12 / 100
10 ms768 KiB
#include "biscuits.h" using namespace std; long long count_tastiness(long long x, vector<long long> a) { int k = a.size(); long long ret = 1, con = 1, cnt = 0; for(int i = 0; i < k; ++i) { cnt += a[i] * con; if(cnt / x < 2 * con - 1) { ret *= cnt / x + 1; con = 1; cnt = 0; } else con *= 2; } ret *= cnt / x + 1; return ret; }
#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...