题目链接:http://acm.hust.edu.cn/vjudge/contest/124435#problem/I

密码:acm

Sample Input

Sample Output

分析:

 #include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<stack>
#include<math.h>
#include<queue>
#include<map>
using namespace std; #define INF 0x3f3f3f3f
#define N 1534 int maps[N][N],dp[N][N]; int main()
{
int n,i,j; scanf("%d", &n); for(i=;i<=n;i++)
for(j=;j<=i;j++)
scanf("%d", &maps[i][j]); for(i=n;i>;i--)
{
for(j=;j<=i;j++)
dp[i][j]=max(dp[i+][j],dp[i+][j+])+maps[i][j];
} printf("%d\n", dp[][]); return ; }

多校 Cow Bowling的更多相关文章

  1. POJ 3176 Cow Bowling

    Cow Bowling Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 13016   Accepted: 8598 Desc ...

  2. Cow Bowling

    Cow Bowling Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 15585 Accepted: 10363 Descrip ...

  3. POJ3176——Cow Bowling(动态规划)

    Cow Bowling DescriptionThe cows don't use actual bowling balls when they go bowling. They each take ...

  4. POJ 3176:Cow Bowling

    Cow Bowling Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 13464   Accepted: 8897 Desc ...

  5. P2877 [USACO07JAN]牛校Cow School(01分数规划+决策单调性分治)

    P2877 [USACO07JAN]牛校Cow School 01分数规划是啥(转) 决策单调性分治,可以解决(不限于)一些你知道要用斜率优化却不会写的问题 怎么证明?可以暴力打表 我们用$ask(l ...

  6. POJ3176 Cow Bowling 2017-06-29 14:33 23人阅读 评论(0) 收藏

    Cow Bowling Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 19173   Accepted: 12734 Des ...

  7. POJ 3176 Cow Bowling(dp)

    POJ 3176 Cow Bowling 题目简化即为从一个三角形数列的顶端沿对角线走到底端,所取得的和最大值 7 * 3 8 * 8 1 0 * 2 7 4 4 * 4 5 2 6 5 该走法即为最 ...

  8. 【POJ 3176】Cow Bowling

    题 Description The cows don't use actual bowling balls when they go bowling. They each take a number ...

  9. poj 3176 Cow Bowling(dp基础)

    Description The cows don't use actual bowling balls when they go bowling. They each take a number (i ...

随机推荐

  1. UISlider 滑竿控件

    UISlider *slider = [[UISlider alloc] initWithFrame:CGRectMake:(100, 100, 200, 25);  //创建一个滑竿对象 slide ...

  2. ECOS- 技术问题答疑[转]

    http://bbs.ec-os.net/read.php?tid=37 1.为什么我购买的是源码版,但是我的base/ego.php(或者base/ego/目录下文件)却是加密的?  答:ego 源 ...

  3. android应用的优化建议(转载)

    首先,这是我在http://www.oschina.net/translate/40-developer-tips-for-android-optimization看到的一片文章,感觉挺有道理的,所以 ...

  4. 邮件发布google blogger 博客

    <?php $to = "@gmail.com";$subject = "Test mail";$message = "Hello! This ...

  5. 查询页面checkbox使用

    HTML <input type="checkbox" id="IsChildGroup" name="IsChildGroup" v ...

  6. hdu_5775_Bubble Sort(树状数组)

    题目链接:hdu_5775_Bubble Sort 题意: 让你找每一个数在冒泡排序中最右边和最左边的位置的差值 题解: 还是官方题解,讲的已经很清楚了 1012 Bubble Sort 考虑一个位置 ...

  7. 引入的ajax中异步添加联系人

    申请出差控制器 中 填写联系人 直接在控制器中实例化联系人表,收集ajax提交的数据.插入表 public function addcontacts(){ $model = M('contacts') ...

  8. HTML5的自定义属性data-*详细介绍和JS操作实例

    当然高级浏览器下可通过脚本进行定义和数据存取.在项目实践中非常有用. 例如: 复制代码 代码如下: <div id = "user" data-uid = "123 ...

  9. insertRule()与addRule()创建规则

    要向现有的样式表中添加新规则,需要使用insertRule()方法.这个方法接受两个参数:规则文本和表示在那里插入规则的索引.下面是一个例子: sheet.insertRule("body ...

  10. htop安装步骤【原创】

    htop安装步骤 下载:http://hisham.hm/htop/releases/ [root@hchtest2 ~]# tar zxvf htop-2.0.2.tar.gz [root@hcht ...