hdu1087 Super Jumping! Jumping! Jumping!

SAP采购订单中项目类别B(限制)的控制逻辑 在笔者所在企业中,框架类采购订单中项目类别需要选择B(限制)。今天笔者从比较全面的角度分析了一下这个项目类别B到底可以决定些什么?控制到什么?先从后台SPRO中打开相应的配置菜单。 打开项目类别B之后,可以看到一些配置信息,这里有一点与其它配置不同的地方,即无法新增项目,也无法修改现有项目。这个疑惑今后再去解决吧。当前只研究项目类别B的控制逻辑。 下面就参考上图中的配置分段来分析和测试其控制逻辑, 1、如项目类别配置图,所需材料值为不允许;经测试,如下图在采购订单创建时,不能输入物料编号条目。 阅读详情

Super Jumping! Jumping! Jumping!


Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 29303    Accepted Submission(s): 13092




Problem Description
Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now.






The game can be played by two or more than two players. It consists of a chessboard(棋盘)and some chessmen(棋子), and all chessmen are marked by a positive integer or “start” or “end”. The player starts from start-point and must jumps into end-point finally. In the course of jumping, the player will visit the chessmen in the path, but everyone must jumps from one chessman to another absolutely bigger (you can assume start-point is a minimum and end-point is a maximum.). And all players cannot go backwards. One jumping can go from a chessman to next, also can go across many chessmen, and even you can straightly get to end-point from start-point. Of course you get zero point in this situation. A player is a winner if and only if he can get a bigger score according to his jumping solution. Note that your score comes from the sum of value on the chessmen in you jumping path.
Your task is to output the maximum value according to the given chessmen list.
 


Input
Input contains multiple test cases. Each test case is described in a line as follow:
N value_1 value_2 …value_N 
It is guarantied that N is not more than 1000 and all value_i are in the range of 32-int.
A test case starting with 0 terminates the input and this test case is not to be processed.
 


Output
For each case, print the maximum according to rules, and one line one case.
 


Sample Input
3 1 3 2
4 1 2 3 4
4 3 3 2 1
0
 


Sample Output
4
10
3


题目的大意是从起点开始跳,只能从小到大跳不能从大到小跳,也可以直接从起点跳到终点,并假设起点最小,终点最大,可以一次跳一步也可以一次跳任意多步,问途径的数组的最大和是多少,这个和最长上升子序列其实没什么本质区别,只不过最长上升子序列是求一个长度,也就是说cou = 0然后cou++这种模式,然而此题是把计数器变成sum求和而已


#include <cstdio>
#include <algorithm>
#include <iostream>
#include <cstdlib>
#include <cstring>

using namespace std;

int a[1005];
int dp[1005];  //dp用来存当前状态的最大和
int sizedp = sizeof(dp);

int main()
{
	int N;
	while (~scanf("%d", &N) && N) {
		for (int i = 0; i < N; i++) {
			scanf("%d", &a[i]);
		}
		int ans = 0;   //初始最大和为0
		memset(dp, 0, sizedp);
		for (int i = 0; i < N; i++) {
			int maxn = 0;
			for (int j = 0; j < i; j++) {   //找i之前的且比a[i]小的中dp的最大值(因为是上升子序列)
				if (a[j] < a[i]) {
					maxn = max(maxn, dp[j]);
				}
			}
			dp[i] = maxn + a[i];  //状态转移方程,当前最优解为上一个最优解加当前a[i]值
			ans = max(ans, dp[i]);  //ans要保留所有上升子序列和的最大值
		}
		printf("%d\n", ans);
	}
	return 0;
}


Supreme小程序自动化抢购终端——源码架构与执行流程全解析 本系统是一套基于开发的桌面端小程序自动化抢购终端。把只有开发者能跑的脚本,包装成普通用户也能操作的桌面工具。参数自动捕获 → 商品多关键词检索 → sku/尺码/库存映射 → 多商品任务队列 → 定时/立即抢购 → 订单创建 → 支付参数拉取 → 本地服务生成支付链接 → 手机微信扫码付款这套 Supreme 抢购终端,表面上看是一个"下单工具"。但从工程角度审视,它已经具备了一个小型桌面自动化系统GUI 层:CustomTkinter 现代化界面,线程安全业务层:多商品队列、定时调度、任务编排。 阅读详情

相关推荐

vcs覆盖率相关

选择要查看的覆盖率点,右键选择 show xxx tests;

qq_40571921的博客 2384

hdu 1087 Super Jumping! Jumping! Jumping!(dp)

hdu 1087 Super Jumping! Jumping! Jumping! http://acm.hdu.edu.cn/showproblem.php?pid=1087 ProblemDescription Nowadays,akindofchessgamecalled“SuperJumping!Jumping!Jumping!”isv...

diansitao5461的博客 94

单粒子翻转对FPGA的影响及解决方法

单粒子翻转对FPGA的影响及解决方法

航天领域资深码农,型号经验丰富,一线干货分享 2445

HDU 【1087】Super Jumping! Jumping! Jumping

Problem Description Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to yo

进击的小白 207

VoLTE吞字断续优化方案

网络侧通过各节点探针的数据采集,能够进行RTP和RTCP包的分析,确定各节点的上行或下行丢包情况。1.基于测试语音分析,每2秒中大约8个字,每个字约10个RTP语音包。通话过程中,语音有短暂停顿,收音段听语音中会出现“吞字/断续现象”2.连续丢3~5个RTP以上就可能会出现吞字断续的感觉。下行评价的丢包问题,很难有效指导定界定位分析,无从下手。2.部分终端可能存在RTCP不反馈,导致无法获取丢包。1.语音包为UDP包,无反馈,终端无法判定是否丢包。终端可依据自身的调度反馈或弃包进行上行丢包判决。

m0_73503557的博客 1509

Bybit面经

这段总结描述了求职者在Bybit面试过程中的经历和相关问题,包括面试内容、求职者向面试官提问的问题以及关于Bybit的信息

郑泽洲的博客 2578

HDU - 1087 Super Jumping! Jumping! Jumping!

Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now. The game c...

zamaochick的博客 395

FPGA设计中的扇出约束实战:从XDC到代码优化的全流程解析

本文全面解析FPGA设计中扇出约束的重要性与应用,详细介绍了从XDC约束文件设置到HDL代码优化的全流程实战技巧。通过MAX_FANOUT约束控制信号负载,结合寄存器复制和物理优化策略,有效解决高扇出导致的时序违例和布线拥塞问题,提升设计性能和可靠性。

nept的博客 796

HDU-1087 Super Jumping! Jumping! Jumping!

动态规划 HDU-1087 Super Jumping! Jumping! Jumping! 题目链接: 杭电1087 题目大意: 给定一列数字 求最大顺序子列和 子列中的数字必须严格由小到大 解题思路: 将数组储存 dp[i]储存以arr[i]为结尾的最大值 循环当前判断的前面的数字 如果当前的数字比之前的数字大 则进行dp的替换 方程为:dp[i] = max(dp[i], dp[j]...

鱼头的水题之路 301

从模组到集装箱:手把手拆解一个储能BMS的软硬件架构设计与通信组网

本文深入解析储能BMS的软硬件架构设计与通信组网,从电芯采样到系统集成的全链条技术实现。详细介绍了三级硬件架构(AFE、CMU、BMU)的设计要点,以及软件分层实现中的驱动层、应用层核心算法和通信协议栈。通过实战案例分享CAN网络搭建、调试工具链和系统验证测试经验,为储能系统开发提供实用指导。

weixin_30752699的博客 462

AI时代的软件质量保证新方法论

3.2.1 质量保证的方法论 质量保证(Quality Assurance, QA)是一种系统化的方法,用于确保产品或服务符合预定的质量标准。在AI时代,软件质量保证的方法论需要适应不断变化的AI技术和应用场景。 3.2.1.1 质量管理体系的构建 首先,构建一个完善

AI天才研究院 1348

HDU 1087 - Super Jumping! Jumping! Jumping!

题目链接:HDU - 1087 Super Jumping! Jumping! Jumping! Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) ...

Ripcord丶的博客 188

BioEmu 扩散模型加速传统分子动力学(MD)模拟

BioEmu 是一种创新的生成式深度学习系统,通过高效采样和准确预测蛋白质的动态机制,为蛋白质科学和药物设计提供了新的工具。它在多构象采样、MD 模拟拟合和蛋白质稳定性预测方面表现出色,同时显著降低了计算成本。BioEmu 的开发为未来蛋白质动态研究和应用奠定了坚实基础。

weixin_42357472的博客 318

HDU 1087 Super Jumping! Jumping! Jumping!

B - Super Jumping! Jumping! Jumping! Crawling in process... Crawling failed Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 10

Inite的博客 601

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

HDU 1087 super jumping!jumping!jumping!

problem description Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to yo...

沧浪之水 491

SIMATIC S7-1200, S7-1500 PID 控制[手册]

SIMATIC S7-1200, S7-1500 PID 控制[手册]

HDU 1087 Super Jumping! Jumping! Jumping!

题目: Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now. Th...

aisebu7819的博客 90

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

hdu 1087 Super Jumping! Jumping! Jumping! 【动规】

题目 Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now. The game can be played by two or more than two players. It consis

QYQHxyh的博客 258

HDu1087 Super Jumping! Jumping! Jumping!

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1087 分析:简单dp;dp[i] = max (dp[i], dp[j] + a[i]) 1 #include<iostream> 2 #include<sstream> 3 #include<cstdio> 4 #include&l...

weixin_30449453的博客 82

HDU - 1087 Super Jumping! Jumping! Jumping!

Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now. The game c...

GJLfly的博客 280

HDU1087 Super Jumping! Jumping!(dp)

HDU1087 Super Jumping! Jumping! (TEST<32> 11.25) 解题思路 dp就是求前面的每一个位置的最大值然后依次往后更新 太菜了 ,看着以前的模板才 AC出来… AC 代码如下 #include<iostream> #include<algorithm> #include<cstring> using names...

MaxVen 169

杭电 1087 hdu (Dynamic Programming)Super Jumping! Jumping! Jumping!

杭电 1087 hdu (Dynamic Programming) Super Jumping! Jumping! Jumping! *Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 66856 Accepted Submission(s): 31301* Problem Description Nowadays, a kind of chess g

邓汪涛的博客 254

HDU 1087 Super Jumping! Jumping! Jumping!【dp】

Super Jumping! Jumping! Jumping! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 35625    Accepted Submission(s): 16206 Problem Descri

Puya的博客 308

hdu-1087 Super Jumping! Jumping! Jumping!(DP解法)

hdu-1087 Super Jumping! Jumping! Jumping!(DP解法)题目描述 Super Jumping! Jumping! Jumping! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 35239

oYinGui1 832

HDU Problem 1087Super Jumping! Jumping! Jumping!

Super Jumping! Jumping! Jumping! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 31007    Accepted Submission(s): 13894 Problem Descri

博客已搬迁到http://www.cnblogs.com/cniwoq/ 372

hdu 1087 Super Jumping! Jumping! Jumping!

Problem Description Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to yo

要去相信,没有到不了的明天 587
上一篇: hdu1159 Common Subsequence
下一篇: poj1163 The Triangle
Daemoonn
博客等级 码龄11年 42粉丝 198原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值