제출 #996316

#제출 시각아이디문제언어결과실행 시간메모리
996316Muaath_5비스킷 담기 (IOI20_biscuits)C++17
9 / 100
1073 ms600 KiB
#include "biscuits.h" #define ll long long ll N; bool can(long long x, std::vector<long long> a) { for (long long i = 0; i < 60; i++) { if ((x>>i)&1) { if (a[i] < N) return false; a[i] -= N; } a[i+1] += a[i]/2; } return true; } long long count_tastiness(long long x, std::vector<long long> a) { a.resize(61); N = x; ll sol = 1; for (int i = 1; i <= 200000; i++) if (can(i, a)) sol++; return sol; }
#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...