poj 3176 Cow Bowling 数塔dp
来源:互联网 发布:淘宝怎么设置客服旺旺 编辑:程序博客网 时间:2024/05/19 23:15
从下网上推。
#include<cstdio>#include<cstring>#include<vector>#include<iostream>#include<algorithm>using namespace std;int a[400][400];int dp[400][400];int main(){ int n; while(scanf("%d",&n)!=EOF) { memset(dp,0,sizeof(dp)); for(int i=1;i<=n;i++) { for(int j=1;j<=i;j++) { scanf("%d",&a[i][j]); if(i==n) dp[i][j]=a[i][j]; } } for(int i=n-1;i>=1;i--) { for(int j=1;j<=i;j++) { dp[i][j]=max(dp[i+1][j],dp[i+1][j+1])+a[i][j]; } } printf("%d\n",dp[1][1]); } return 0;}
4 0
- poj 3176 Cow Bowling 数塔dp
- POJ-3176 Cow Bowling 数塔,简单DP
- poj 3176 Cow Bowling 【数塔】
- POJ 3176 Cow Bowling DP
- poj-3176-Cow Bowling-dp
- poj 3176 Cow Bowling (DP)
- poj 3176 Cow Bowling dp
- POJ 3176 Cow Bowling DP
- poj 3176Cow Bowling DP
- Poj 3176 Cow Bowling【dp】
- POJ 3176 Cow Bowling (dp)
- POJ 3176-Cow Bowling/POJ 1163-The Triangle(简单DP-数塔)
- POJ 3176 Cow Bowling (简单dp——数塔问题)
- poj3176--Cow Bowling(dp:数塔问题)
- poj 3176 -- Cow Bowling (dp)
- POJ 3176 Cow Bowling (简单DP)
- POJ 3176 Cow Bowling (简单DP)
- POJ 3176-Cow Bowling (简单DP)
- quartz spring 版本兼容问题
- Socket之shutdown()用法
- UVALive - 3667 Ruler
- SRM 555
- CSDN 博客没有千里之外了,而是显示了排名
- poj 3176 Cow Bowling 数塔dp
- Chrome 浏览器 extension 指南
- LA 3644 X-Plosives / 并查集
- Java中的Calendar方法
- 实时开发框架Meteor API解读系列<二>Core
- 七款代码味道识别工具【简介】
- ZOJ-2529
- 关于SetWindowOrg和SetViewportOrg函数的说明!
- mysql数据库连接简单分析 dao的应用