Submission #1052551

#TimeUsernameProblemLanguageResultExecution timeMemory
1052551MercubytheFirstPacking Biscuits (IOI20_biscuits)C++17
0 / 100
0 ms348 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; using ll = long long; const ll K = 61, MX = 1e5 + 1; long long count_tastiness(long long x, std::vector<long long> a) { ll running_sum = 0, cur_ans = 1, k = a.size(); for(ll i = 0; i < k; ++i) { if(running_sum + 1 < (1 << i)) { cur_ans *= a[i]; running_sum += (a[i] << i); } else { cur_ans += a[i] << i; } } return cur_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...