Submission #546825

#TimeUsernameProblemLanguageResultExecution timeMemory
546825LucaDantasPacking Biscuits (IOI20_biscuits)C++17
9 / 100
1087 ms340 KiB
#include "biscuits.h" long long count_tastiness(long long x, std::vector<long long> a) { long long ans = 0; while(a.size() < 20) a.push_back(0); for(int mask = 0; mask <= 100000; mask++) { long long tem = 0; bool ok = 1; for(int b = 0; b < 20; b++) { tem += a[b]; if(mask&(1<<b)) { if(tem >= x) tem -= x; else {ok = 0; break;} } tem >>= 1; } ans += ok; } 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...