雕刻时光

just do it……nothing impossible
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年8月2日

摘要: 经典的dp,对我这种菜鸟有难度啊。。。由于石头可以围成一个环,所以要原来数据*2用记忆化搜索,其实就是dpView Code #include<stdio.h>#include<string.h>int a[209];int maxdp[209][209];int mindp[209][209];int sum[209][209];int max(int a,int b){ if(a>b)return a; else return b;}int min(int a,int b){ if(a>b)return b; else return a;}int dfs 阅读全文

posted @ 2011-08-02 18:13 huhuuu 阅读(1656) 评论(0) 推荐(0) 编辑