Submission #480071

#TimeUsernameProblemLanguageResultExecution timeMemory
480071couplefirePacking Biscuits (IOI20_biscuits)C++17
9 / 100
1164 ms1050992 KiB
#include <bits/stdc++.h> using namespace std; #define int long long int count_tastiness(int x, vector<int> cnt){ vector<int> dp = {0}; int hi = 0; while(cnt.size()<60) cnt.push_back(0); for(int i = 0; i<60; ++i){ hi += cnt[i]*(1<<i); for(int j = 0, s = min((__int128)x*(1ll<<i), (__int128)(1e18)+1), m = dp.size(); j<m && dp[j]+s<=hi; ++j) dp.push_back(dp[j]+s); } return dp.size(); }
#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...