标签:can idt ref amp tle 节点 src 最大的 build
#include<stdio.h> typedef long long LL; LL dp[65] = { 0,1 }; int n, d; LL build(int x) { if (x <= 0)return 0; if (dp[x]>0)return dp[x]; dp[x] = 1+build(x - 1) + build(x - 1 - d); return dp[x]; } int main() { while (~scanf("%d %d", &n, &d)) { LL left = (1LL << (n - 1)) - 1; LL right = build(n - 1 - d); printf("%lld\n", left - right); } }
标签:can idt ref amp tle 节点 src 最大的 build
原文地址:https://www.cnblogs.com/tobyw/p/9737575.html