제출 #581937

#제출 시각아이디문제언어결과실행 시간메모리
581937joelau비스킷 담기 (IOI20_biscuits)C++14
9 / 100
1094 ms340 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; long long X; vector<long long> A; long long f(long long n) { if (n == 60) return 1; A[n+1] += A[n]/2; long long ans = f(n+1); A[n+1] -= A[n]/2; if (A[n] >= X) { A[n] -= X, A[n+1] += A[n]/2; ans += f(n+1); A[n+1] -= A[n]/2, A[n] += X; } return ans; } long long count_tastiness(long long x, vector<long long> a) { while (a.size() < 60) a.push_back(0); X = x, A = a; return f(0); }
#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...