zh成功的在他人的帮助下获得了与小姐姐约会的机会,同时也不用担心被非"川大"的女票发现了,可是如何选择和哪些小姐姐约会呢?zh希望自己可以循序渐进,同时希望挑战自己的极限,我们假定每个小姐姐有一个"攻略难度值" 从攻略成功第一个小姐姐开始,zh希望每下一个需要攻略的小姐姐难度更高,同时又希望攻略难度值之和最大,好了,现在小姐姐们排成一排,zh只能从左往右开始攻略,请你帮助他找到最大的攻略难度和 Input 多组输入,每组数据占一行,每行一个整数n表示小姐姐个数,接着…
Super Jumping! Jumping! Jumping! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Problem Description Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a…
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 t…
Super Jumping! Jumping! Jumping! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 32561    Accepted Submission(s): 14689 Problem Description Nowadays, a kind of chess game called “Super Jumping!…
Super Jumping! Jumping! Jumping! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 50078    Accepted Submission(s): 23221 Problem Description Nowadays, a kind of chess game called “Super Jumping!…
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=1087 Super Jumping! Jumping! Jumping! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 41523    Accepted Submission(s): 19239 Problem Descript…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1087 题目大意: 求递增子序列最大和 思路: 直接dp就可以求解,dp[i]表示以第i位结尾的递增子序列最大和,初始化dp[i] = a[i],转移方程dp[i] = max(dp[i], a[i] + dp[j])如果j < i && a[j] < a[i] #include<cstdio> #include<cstring> #include<i…
题目意思: http://acm.hdu.edu.cn/showproblem.php? pid=1087 此题的意思求最长上升子序列的和. 题目分析: 在求最长上升子序列的时候,不在保存最长的个数,而是保存他们的和就可以. AC代码: /** *最长上升子序列问题+保存得到的分数 */ #include<iostream> #include<cstdio> #include<map> #include<cstring> #include<string…
题目链接: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<cstdlib> 5 #include<string> 6 #include<cstring> 7 #inc…
传送门:HDU_1087 题意:现在要玩一个跳棋类游戏,有棋盘和棋子.从棋子st开始,跳到棋子en结束.跳动棋子的规则是下一个落脚的棋子的号码必须要大于当前棋子的号码.st的号是所有棋子中最小的,en的号是所有棋子中最大的.最终所得分数是所有经过的棋子的号码的和. 思路:读完题之后知道这是一个最长上升子序列的题目.因为之前刚刚看过牛客网上一节讲解最长上升子序列的视屏,所以一上来就找准了方向,but我只知道怎么求最长上升子序列的长度啊,和怎么求???于是自己想方法开始求和,然后就wa掉了一个上午.…