Treats for the Cows(dp)
来源:互联网 发布:西南石油大学软件下载 编辑:程序博客网 时间:2024/06/05 20:49
http://acm.pku.edu.cn/JudgeOnline/problem?id=3186
有一些食物,放在一个两端开口的仓库里,每天只能从两端选择一端取出一件食物,并且食物的价值是随着天数逐天递增,第i天的价值 本来价值*i,求n天取出食物,使之取得最大价值;
状态转移方程:
dp[i][j]=max(dp[i+1][j]+t[i]*(n-j+i), dp[i][j-1]+t[j]*(n-j+i));
i~j 看作 食物存放次序第 i 到 j 的一段区间
i从n开始dp;
- Treats for the Cows(dp)
- poj 3186 Treats for the Cows(DP)
- 【POJ 3186 】Treats for the Cows (区间DP)
- POJ 3186 Treats for the Cows(区间DP)
- poj 3186 Treats for the Cows(区间dp)
- POJ - 3186 Treats for the Cows(DP)
- POJ 3186 Treats for the Cows(区间DP)
- POJ 3186 Treats for the Cows (区间DP)
- POJ 3186 Treats for the Cows (区间DP)
- poj 3186 Treats for the Cows (区间DP)
- poj 3186 Treats for the Cows(区间dp)
- POJ-3186 Treats for the Cows (区间DP)
- POJ 3186 Treats for the Cows(区间dp)
- poj 3186 Treats for the Cows (区间dp)
- POJ3186:Treats for the Cows(区间DP)
- POJ3186:Treats for the Cows 区间DP
- POJ 3186 Treats for the Cows (DP)
- POJ3186 Treats for the Cows DP
- [转载]SQL Server 2005 Data Mining简介
- Improve Scalability With New Thread Pool APIs
- linux静态库和动态库
- Compile workrave under windows – My exprience 在Windows上编译Workrave
- asp.net中ListBox列表项在客户端的选择移动
- Treats for the Cows(dp)
- 版本控制软件VSS
- js脚本兼容问题
- JAVASCRIPT定时自动转向指定页面
- 做了一件蠢事
- kthread_run()和kthread_stop()函数
- Oracle RAC 10.2.0.1 升级 10.2.0.4 简单描述
- visual studio 2008 清空项目文件
- 进制题