HDU 1176(数塔)
来源:互联网 发布:阿里云 centos7 lnmp 编辑:程序博客网 时间:2024/06/05 02:25
#pragma warning(disable:4996)#include<cstdio>#include<cstring>#include<string>#include<cmath>#include<vector>#include<algorithm>#include<iostream>#include<time.h>using namespace std;int dp[100005][15];int main(){ int n; while (cin >> n, n) { memset(dp, 0, sizeof(dp)); int t = 0; for (int i = 1; i <= n; i++) { int a, b; cin >> a >> b; dp[b][a + 1]++; if (b > t) t = b; } for (int i = t - 1; i >= 0; i--) { for (int j = 1; j <= 11; j++) { dp[i][j] += max(dp[i + 1][j], max(dp[i + 1][j - 1], dp[i + 1][j + 1])); } } printf("%d\n", dp[0][6]); } return 0;}
1 0
- HDU 1176(数塔)
- hdu 1176免费馅饼(数塔)
- hdu 1176 数塔变形
- HDU 2084(数塔)
- HDU 数塔 (dp)
- 数塔(HDU-2804)
- 数塔 (dp)HDU
- hdu 1176 免费馅饼(数塔问题)
- hdu 1176 免费馅饼 (数塔变形)
- hdu 1176 免费馅饼 (数塔dp)
- HDU 2084 数塔-dp-(数塔)
- hdu 1176 dp近似数塔
- hdu 1176 免费馅饼 (数塔)
- HDU 1176 免费馅饼(数塔变形)
- HDU 1176 免费馅饼 数塔
- HDU 1176 DP 数塔解决
- HDU-1176-数塔DP-免费馅饼
- HDU-1176 免费馅饼 【DP数塔】
- OC-委托模式
- Java基础之(三十三)Map
- Android: EditText监听内容变化
- 主板各芯片简介
- 错误记录七
- HDU 1176(数塔)
- TestNG套件测试
- JAVA—HashMap底层实现原理,及HashMap解决冲突的方法
- Android 进程保活招式大全
- LinkedList 灵活应用 --------------亚信 编程题01
- EasyUI Demo
- Google机器学习笔记(七)TF.Learn 手写文字识别
- 粗心的物理学家 FZU-1058 (水坑题)
- App界面原型设计工具