Submission #413121

#TimeUsernameProblemLanguageResultExecution timeMemory
413121atoizPacking Biscuits (IOI20_biscuits)C++14
0 / 100
223 ms332 KiB
#include "biscuits.h" #include <numeric> #include <cstdio> long long count_tastiness(long long x, std::vector<long long> a) { int res = 0; for (int i = 0; i <= 100000; ++i) { int c = 0, b = 1, p = i; for (int j = 0; j < (int) a.size(); ++j) { c += a[j]; if ((p >> j) & 1) { p ^= 1 << j; c -= x; if (c < 0) b = 0; } c /= 2; } if (p) b = 0; res += b; } return res; }
#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...