(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

Submission #348356

#TimeUsernameProblemLanguageResultExecution timeMemory
348356dennisstarPacking Biscuits (IOI20_biscuits)C++17
100 / 100
17 ms1388 KiB
#include <bits/stdc++.h> #include "biscuits.h" using namespace std; using ll = long long; const int MX = 62; ll count_tastiness(ll x, vector<ll> a) { vector<ll> D(MX, 1); a.resize(MX); for (int i=1; i<MX; i++) { a[i]=(a[i]<<i)+a[i-1]; ll n=(1e18); for (int j=i-1; j>=0; j--) { n=min(n, a[j]); if (x<=(n>>j)) D[i]+=D[j], n-=(x<<j); } } return D.back(); }
#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...