hdu 1087 Super Jumping! Jumping! Jumping!(DP)

Raptor码(一):2007RFC5053标准编解码学习 RFC 5053 标准 阅读详情

Super Jumping! Jumping! Jumping!

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


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

题目链接:vhttp://acm.hdu.edu.cn/showproblem.php?pid=1087


题目大意:找出长度为n的序列的最大递增子序列和(数字不要求连续),如例一:递增子序列有(1,)(1,3)(3)(1,2)(2),和 最大的是(1,3),和为4。


题目解析:DP,dp[i]表示包含a[i]的,前i个数字组成的序列的最大递增子序列和。初始化dp[i]=a[i],找到前面比a[i]小的数a[j],态转移返方程为:dp[i]=max(dp[i],dp[j]+a[i]).

#include <cstdio>
#include <cstring>
const int maxn=1005;
int a[maxn],dp[maxn];  //dp[i]表示包含第i个数字的前i个位置的最大子序列和
int main()
{
    int n,i,j,max;
    while(scanf("%d",&n)!=EOF&&n)
    {
        for(i=0;i<n;i++)
            scanf("%d",&a[i]);
        max=dp[0]=a[0];
        for(i=1;i<n;i++)
        {
            dp[i]=a[i];   //初始化dp[i]
			for(j=i-1;j>=0;j--)
            {
                if(a[j]<a[i]&&a[i]+dp[j]>dp[i])  //状态转移方程:dp[i]=max(a[i]+dp[j],dp[i])
				{
                    dp[i]=dp[j]+a[i];    
					if(dp[i]>max)
					max=dp[i];
				}
            }
        }
        printf("%d\n",max);
    }
    return 0;
}


代码如下:


利用DRONEKIT-SITL + MAVPROXY + QGroundControl模拟飞行 dronekit: 一种用于无人机控制的python库。 dronekit-sitl:一种本地仿真工具,相当于本地虚拟化了一个无人机。 mavproxy:数据转发软件(类似于插线板的感觉,一个输入,多个相同的输出)。打开一个Anaconda prompt 首先激活相应的环境 然后运行如下命令: 保持2中的Anaconda prompt处于运行状态,另打开一个Anaconda prompt窗口,运行如下命令: tcp:127.0.0.1:5760: SITL默认端口,作为mavproxy的输入,把输入数据转发 阅读详情

相关推荐

晶体管的 栅极gate 材料选用 多晶硅polysilicon,并采用 自对准工艺 self-aligned IC后端版图 【VLSI】

本文为了解决为什么要使用多晶硅作栅极触点的问题,先介绍了MOS管的工作原理是通过栅极上所加的电压控制漏极与源极之间电流,然后解释了栅极的材料为什么选用多晶硅,然后介绍了晶体管里栅极的自对准工艺(Self-Aligned Gate )。

Jie_MSD的博客 1万+

hdu1087 - 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): 20915    Accepted Submission(s): 9133 Problem Descripti

ITCTO-疯男的CSDN博客 564

mfcc总结,这个mel三角滤波器分组到底是如何起作用的呢?

先看fft频谱图(这是4096字节取样fft计算,横轴频率是从0到512,后边意义不大,未取,纵轴是振幅),那些我随便画的蓝色线,你有什么联想?: 再看,这绿色线,是否有一种上升后,便逐渐式微的感觉,都是三角形的,这或许也是mel当初和绝大多数人看到的: 如果在振幅上加上一条限制的黑线(振幅门槛限制),黑色线以下很多频率就没有意义了,你看,有用的频率连一半(512/2=256)都占不到...

ganggangwawa的博客 9914

HDUOJ 1087 Super Jumping! Jumping! Jumping!

HDUOJ 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 you now.

旺崽的博客 2689

使用python对创芯科技CANalyst-II分析仪进行二次开发(详细教程)

使用python对创芯科技CANalyst-II分析仪进行二次开发

ningqingzy的博客 1万+

vue 插件vue-awesome-swiper实现 三张图片,左右两边显示一半的效果的示例

希望我的愚见能够帮助你哦~,若有不足之处,还望指出,你们有更好的解决方法,欢迎大家在评论区下方留言支持,大家一起相互学习参考呀~

weixin_50450473的博客 3268

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的博客 97

芯片低功耗设计的两种常用EDA流程

如题。

EricWZY2008的专栏 5572

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 837

SpringBoot整合JWT实战:从零构建无状态认证系统,详解Token生成、验证与安全最佳实践

JWT在SpringBoot中的实现与应用 摘要:本文介绍了JWT(JSON Web Token)的基本概念、与Session机制的对比,以及SpringBoot项目中JWT的整合实现。JWT由Header、Payload和Signature三部分组成,具有无状态、跨域支持等优势。文章详细展示了如何在SpringBoot项目中配置JWT环境,封装JWT工具类来实现Token的生成、解析和验证功能,包括密钥管理、自定义声明、签名验证等核心操作。通过对比表格和生活化比喻,帮助读者理解JWT与传统Session的

本博客聚焦 YOLOv11 全流程落地,涵盖架构优化、数据集处理、训练技巧与多场景部署,兼及国产数据库、Java 开发与 AI 模型应用,内容兼顾理论与工程实践,为开发者提供系统干货,助力高效提升技术能力。 1782

Python爬虫实战:抓取全球船舶AIS定位数据的全流程指南

AIS(Automatic Identification System)自动识别系统是目前全球航运中用于实时跟踪船只位置的主要技术。名称、MMSI编号、呼号实时经纬度船速、航向吃水、目的港状态(航行/停泊/锚泊)航线信息等🛰️海上运输监控:追踪航线,预估到港时间;🛳️船舶管理系统:为物流、港口运营提供决策依据;🌊研究分析:如海洋运输碳排放研究、船只拥堵热力图等;🧠人工智能训练数据集:用于轨迹预测、碰撞预警模型。

2201_76125261的博客 1373

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丶的博客 189

【人工智能的数学基础】最优传输(Optimal Transport)问题与Wasserstein距离

代表两堆石子,则问题等价于如何移动一堆石子,通过最小的累积移动距离把它堆成另外一堆石子。的不同位置分配的值。为离散型概率分布,则该优化问题可以表示为矩阵形式。表示寻找总运输成本最小的方案。放大后的上确界不会小于原来的上确界,因此不妨取。具有相同的概率分布。是概率分布,因此积分可以写作采样形式。描述了一种可行的运输方案,表示应该从位置。则最优传输问题的目标函数可以用列向量。对于一个线性规划问题,总可以写出其。的所有可能联合分布的集合,下确界。其中矩阵的每一行代表概率分布。表示寻找使得目标函数最大的。

AI天才研究院 6330

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 170

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

贝叶斯统计 [韦来生编]

贝叶斯(Bayes)统计是近几十年来迅速发展起来的数理统计的一个重要分支。贝叶斯方法与经典统计方法的主要不同之处是进行统计推断时除了利用样本信息外,还要利用参数的先验信息,因此可以提高统计推断或统计决策的效果。它在经济、金融、生物、医学、自然科学和社会科学等许多领域具有广泛的应用。贝叶斯方法的研究已渗透到了统计学的几乎所有领域。作者在给中国科学技术大学概率论与数理统计专业本科生开设的“数理统计”课程中有一章专门讲授“贝叶斯方法和统计决策理论”,近十年来也给中国科学技术大学概率统计专业研究生开设过几次“贝叶斯分析”课。本书是在对过去讲稿的内容作了适当的增减和调整的基础上完成的。  本书共分六章。第1章是绪论,介绍了贝叶斯统计的若干基本概念,同时对必要的数理统计的基础知识有重点地作了回顾。第二章介绍了确定先验分布的若干可供选择的方法。第三章介绍了几类常见统计模型参数的后验分布的主要结果和计算方法。第四章和第五章分别介绍了“贝叶斯统计推断”和“贝叶斯统计决策”的内容。第六章介绍了贝叶斯统计计算的若干方法,包括蒙特卡洛方法和马尔可夫链蒙特卡洛(MCMC)方法以及相关统计软件的简介。本书的每一章附右大量的例题和习题,书末附有常用的几个表格和部分习题解答供读者查用。  大约可在54学时内讲授本书的第1章至第六章的主要内容,教师可根据学时需要选讲本书第1章至第六章的部分内容。书中标“*”号的章节可略去不讲,留给读者作为阅读材料。第六章例题中的R代码和部分例题的数据文件等可从作者个人主页下载。  作者在编写本书的过程中参考了J.O.Berger教授的《统计决策论及贝叶斯分析》和茆诗松教授编写的《贝叶斯统计》等书中的一些内容,以及《贝叶斯分析》一书中由张伟平博士编写的有关贝叶斯统计计算的一些内容。在此表示衷心感谢。  本书编写准备过程中,中国科学技术大学统计与金融系的几个研究生帮助完成了本书部分中文的录入和排版,作者对他们的辛勤工作表示真诚的感谢。高等教育出版社为本书的出版给予了大力支持。在此一并致谢。

杭电 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

邓汪涛的博客 256

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

Super Jumping! Jumping! Jumping!【基础DP】

题目链接:HDU-1087 kuangbin带你飞【专题十二 基础DP1 】 题目描述: 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...

Hang_ccccc的博客 265

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

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

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的博客 396

HDU - 1087 Super Jumping! Jumping! Jumping! (DP)

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 ...

洛 水 145

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

进击的小白 208

HDU1087:Super Jumping! Jumping! Jumping!(上升子序列最大和)

HDU1087:Super Jumping! Jumping! Jumping! kuangbin专题十二:E题 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 41625Accepted Submission(s):...

aboc43983的博客 154

B - Super Jumping! Jumping! Jumping! HDU - 1087(dp)

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...

莉莉莉的博客 391

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的博客 84

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!

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的博客 281

Hdu 1087 Super Jumping! Jumping! Jumping!

Hdu 1087 Super Jumping! Jumping! Jumping! 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1087 解题思路:用dp数组记录到i位的最长上升序列的和,每一步往前找前置最大的符合题意的结果,转移方程dp[i]=max(dp[i],dp[j]+num[i]); 代码如下: #include <bits/st...

weixin_43823753的博客 175
上一篇: hdu 1166 敌兵布阵(线段树)
下一篇: hdu 1231 最大连续子序列(DP)
雨狮子
博客等级 码龄12年 24粉丝 185原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值
⌂ 换网址