제출 #581751

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