题目名称 | 1398. 最长上升子序列 |
---|---|
输入输出 | lis1.in/out |
难度等级 | ★☆ |
时间限制 | 1000 ms (1 s) |
内存限制 | 256 MiB |
测试数据 | 10 |
题目来源 | yuan 于2013-09-11加入 |
开放分组 | 全部用户 |
提交状态 | |
分类标签 | |
分享题解 |
通过:654, 提交:1456, 通过率:44.92% | ||||
TA | 100 | 0.000 s | 0.00 MiB | Pascal |
风吹我已散 | 100 | 0.000 s | 0.00 MiB | C++ |
哒哒哒哒哒! | 100 | 0.000 s | 0.00 MiB | C++ |
哒哒哒哒哒! | 100 | 0.000 s | 0.00 MiB | C++ |
MistyEye | 100 | 0.000 s | 0.00 MiB | C++ |
MistyEye | 100 | 0.000 s | 0.00 MiB | C++ |
Yuri | 100 | 0.000 s | 0.00 MiB | C++ |
YGOI_真神名曰驴蛋蛋 | 100 | 0.000 s | 0.00 MiB | C++ |
LOSER | 100 | 0.000 s | 0.00 MiB | C++ |
GaoErFu | 100 | 0.000 s | 0.00 MiB | C++ |
本题关联比赛 | |||
动态规划练习2 |
关于 最长上升子序列 的近10条评论(全部评论) | ||||
---|---|---|---|---|
日常二分写错
| ||||
································································································································································································································································································································································································································································································································
| ||||
| ||||
线段树是什么鬼
李俊辉
2019-08-11 21:01
35楼
| ||||
数据有问题,最后一个点中最长上升子序列为 0 1 2 3 4 5 6 7 8 9 10 56 96 101
0不是正整数; 这样会导致程序输出13(正解为14); 正在请求老师修复 | ||||
写反了,很丢人
| ||||
呵呵呵
| ||||
有毒吧
天网
2018-04-09 21:33
31楼
| ||||
大神看看为什么不对啊
| ||||
s[0]=-1,欲哭无泪
|
设有整数序列A[1],A[2],A[3],…,A[m],若存在下标i1<i2<i3<…<in,且A[i1]<A[i2]<A[i3]<…<A[in],则称 序列A[1],A[2],A[3],…,A[m]中有长度为n的上升子序列A[i1] , A[i2] ,A[i3] ,…,A[in]。
请编程计算指定序列的最长上升子序列长度。
第一行一个正整数n(n<1001),表示序列中整数个数;
第二行是空格隔开的n个整数组成的序列。
一个正整数,表示输入文件中整数序列的最长上升子序列的长度。
7 1 7 3 5 9 4 8
4