Poj 1163 题解
来源:互联网 发布:移动直播app 开源 源码 编辑:程序博客网 时间:2024/06/13 04:12
打完后编译都没编译直接acv.
Code:
#include<cstdio>#include<iostream>#include<cstring>#include<algorithm>using namespace std;int a[1100][1100],n;int f[1100][1100];void Input(){ scanf("%d",&n); for(int i=1;i<=n;i++) { for(int j=1;j<=i;j++) scanf("%d",&a[i][j]); }}void Solve(){ for(int i=n;i>=1;i--) for(int j=1;j<=i;j++) f[i][j]=max(f[i+1][j],f[i+1][j+1])+a[i][j];}void Output(){ printf("%d\n",f[1][1]);}int main(){ freopen("a.in","r",stdin); freopen("a.out","w",stdout); Input(); Solve(); Output(); return 0;}
0 0
- Poj 1163 题解
- POJ 1163 The Triangle DP题解
- POJ 1011 题解
- poj-1050 题解
- poj-1088题解
- poj-1159题解
- POJ 1009题解
- POJ 1458题解
- Poj 2352 Stars 题解
- POJ 2739题解---小菜
- POJ 1753题解
- POJ 1328题解
- POJ 2049题解
- poj 2679题解
- poj 1149题解
- poj 2790迷宫题解
- POJ - Counterfeit Dollar 题解
- poj 2318 TOY题解
- StringBuilder学习笔记
- 将整形的二进制数翻转再求值
- 黑马程序员_Java反射机制学习笔记
- Oracle计算时间差函数
- Ehcache配置参数简介
- Poj 1163 题解
- 【转载】【OpenCV】访问Mat中每个像素的值(新)
- DedeCMS程序include目录文件作用解析
- nyoj 448 寻找最大数
- leetcode-palindrome number
- MySQL新建用户,授权,删除用户,修改密码
- C++类型转换关键字(*_cast)
- LeetCode(9) Palindrome Number
- 苹果Xcode帮助文档阅读指南