会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
The River is Just a River
If you're absent from my struggle,then,don't be present for my success
公告
日历
导航
博客园
首页
新随笔
新文章
联系
订阅
管理
随笔分类 -
Algorithm
动态规划 求解Fibonacci
摘要:使用了4种方法求解Fabonacci数列,代码如下:(假设数列为 0 1 1 2 3 5 ……)注意第一项以0开始 1 #include <iostream> 2 #include <time.h> 3 #include <math.h> 4 using namespace std; 5 6 //递归求解 7 int fib_recursion( int n ) 8 { 9 10 if( n==0 ) return 0;11 if( n==1 ) return 1;12 13 return fib_recursion(n-1) + fib_recursion
阅读全文
posted @
2012-03-31 21:57
TiffanyZhou
阅读(530)
评论(0)
推荐(0)
博客园
© 2004-2026
浙公网安备 33010602011771号
浙ICP备2021040463号-3