Submission #823962

#TimeUsernameProblemLanguageResultExecution timeMemory
823962Abrar_Al_SamitPacking Biscuits (IOI20_biscuits)C++17
0 / 100
1067 ms380 KiB
#include <bits/stdc++.h> #include "biscuits.h" using namespace std; long long count_tastiness(long long x, vector<long long> a) { int k = a.size(); long long ans = 0; for(int y=0; y<=100000; ++y) { auto b = a; bool yes = true; for(int i=0; i<k; ++i) { if(y >> i & 1) { yes &= b[i] >= x; b[i] -= x; } if(i<k-1) b[i+1] += b[i] / 2; } ans += yes; } 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...