제출 #547346

#제출 시각아이디문제언어결과실행 시간메모리
547346LucaDantas비스킷 담기 (IOI20_biscuits)C++17
0 / 100
1147 ms1176028 KiB
#include "biscuits.h" #include <cstdio> long long count_tastiness(long long x, std::vector<long long> a) { std::vector<long long> val = {0}; while(a.size() < 60) a.push_back(0); for(int i = 1; i < (int)a.size(); i++) a[i] = (1ll << i) * a[i] + a[i-1]; for(int i = 0; i < 60; i++) { int sz = (int)val.size(); for(int j = 0; j < sz && (val[j] + (1ll<<i))*x <= a[i]; j++) val.push_back(val[j] + (1ll<<i)); } return val.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...