摘要: 一个(N,M)大小的方格,交点处会随机出现苹果,规则是从左上顶点到右下顶点走,且只能向下向右走,求最多能捡多少个苹果动态规划的问题:设在点(n,m)处有一个苹果,则对于点(n,m)处最多的苹果数 S(n,m)=max{S(i,j)+1,1};所以,代码如下:class Point { ... 阅读全文
posted @ 2015-07-14 22:55 LouisGuo 阅读(465) 评论(0) 推荐(0) 编辑
摘要: 下面是递归方式:private static int Fib_RE(int n) { re_Count++; if(n dic) { fa_Count++; if(!dic.Conta... 阅读全文
posted @ 2015-07-14 13:22 LouisGuo 阅读(179) 评论(0) 推荐(0) 编辑