摘要:
#include <iostream>#include <cstdio>using namespace std;int mem[200];//开记忆数组int fib(int n){ if(mem[n]!=0) return mem[n]; //每次先从记忆数组里寻找,如果有,直接用就行 if(n= 阅读全文
posted @ 2020-10-03 14:20
py佐料
阅读(178)
评论(0)
推荐(0)
摘要:
#include <iostream> #include <cstdio> using namespace std; int n,r; int ans[100]; int fun(int i,int x) //功能单元:根据现在的深度和上一次选出来的数字,决定下一次选出的数 { if(i==r) { 阅读全文
posted @ 2020-10-03 14:16
py佐料
阅读(106)
评论(0)
推荐(0)