Submission #413127

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