Submission #307708

#TimeUsernameProblemLanguageResultExecution timeMemory
307708CodePlatinaPacking Biscuits (IOI20_biscuits)C++14
12 / 100
1 ms384 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 < 2 * con - 1) { ret *= (cnt + 1); con = 1; cnt = 0; } else con *= 2; } ret *= (cnt + 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...