제출 #638366

#제출 시각아이디문제언어결과실행 시간메모리
638366slime비스킷 담기 (IOI20_biscuits)C++14
0 / 100
1 ms340 KiB
#include "biscuits.h" #include "bits/stdc++.h" using namespace std; long long count_tastiness(long long x, std::vector<long long> a) { int k = a.size(); __int128 rr = 0; __int128 ans = 1; __int128 div = 1; for(int i=0; i<k; i++) { __int128 pp = (1ll << i); rr += (pp / div) * (__int128) a[i]; if(i+1 < k && rr < pp / div * 2) { ans *= rr; rr = 1; div = pp * 2; } } ans *= rr; 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...