0
点赞
收藏
分享

微信扫一扫

HODJ 1087 Super J…


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

题目可以简化为求一组数字的最大上升序列的和



我们一次遍历整个序列,每一次求出第一个数到当前这个数的最大上升序列的和,直至遍历到最后一个数字为止,然后再取dp数组当中的最大值即可……



在此推荐一个写LIS(longest increasing subsequence)博客本人感觉写的非常好



​​http://www.wutianqi.com/​​



#include


#include


using namespace std;


int main(){

举报

相关推荐

0 条评论