文件名称:lab4
介绍说明--下载内容均来自于网络,请自行研究使用
最长递增子序列
问题描述: 随机生成小于等于n的自然数的一个序列,
输出其最长递增子序列(任意一个即可)。
n 分别取 1000,3000,10000。
例: n=5 随机序列为 5 1 4 2 3,正确输出为1 2 3,
即长度为3的递增子序列。
提示:参考LCS,思考能否达到时间复杂度(O(nlogn))
-Longest increasing subsequence problem descr iption: randomly generate a sequence of less than or equal to n natural numbers, the output of its longest increasing subsequence (any one can). n were taken 1000,3000,10000. Example: n = 5 random sequence of 51 423, the correct output is 123, ie increasing subsequence of length 3. Hint: LCS, thinking can achieve time complexity (O (nlogn))
问题描述: 随机生成小于等于n的自然数的一个序列,
输出其最长递增子序列(任意一个即可)。
n 分别取 1000,3000,10000。
例: n=5 随机序列为 5 1 4 2 3,正确输出为1 2 3,
即长度为3的递增子序列。
提示:参考LCS,思考能否达到时间复杂度(O(nlogn))
-Longest increasing subsequence problem descr iption: randomly generate a sequence of less than or equal to n natural numbers, the output of its longest increasing subsequence (any one can). n were taken 1000,3000,10000. Example: n = 5 random sequence of 51 423, the correct output is 123, ie increasing subsequence of length 3. Hint: LCS, thinking can achieve time complexity (O (nlogn))
(系统自动生成,下载前可以参看下载内容)
下载文件列表
lab4.cpp