{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cscript type\u003d\u0027text/x-mathjax-config\u0027\u003eMathJax.Hub.Config({tex2jax: { inlineMath: [[\u0027$\u0027,\u0027$\u0027],[\u0027\\[\u0027,\u0027\\]\u0027]] } }); \u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027 src\u003d\u0027https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\u0027\u003e\u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027\u003esetTimeout(function(){MathJax.Hub.Queue([\u0027Typeset\u0027, MathJax.Hub, \u0027description-container\u0027]);}, 2000);\u003c/script\u003e\n\u003chtml\u003e\n \u003chead\u003e\u003c/head\u003e\n \u003cbody\u003e\n \u003cp\u003e一个数列的高度,是指其所有递增的子列中最长的一个子列的长度\u003c/p\u003e \n \u003cp\u003e给定一个长度为 n 的数列 an,求这个数列的高度\u003c/p\u003e \n \u003cp\u003e例如对数列 1 7 2 8 3 4,这个数列的最长子列是 1 2 3 4,长度为 4;次长的长度为 3, 包括 1 7 8、1 2 3 等。\u003c/p\u003e \n \u003c/body\u003e\n\u003c/html\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003chtml\u003e\n \u003chead\u003e\u003c/head\u003e\n \u003cbody\u003e\n 第一行一个正整数 n,表示数列元素个数,n\u0026lt;\u003d1000 第二行 n 个正整数,从左到右给出数列的每一项\n \u003c/body\u003e\n\u003c/html\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003chtml\u003e\n \u003chead\u003e\u003c/head\u003e\n \u003cbody\u003e\n 一行一个正整数,表示该数列的高度\n \u003c/body\u003e\n\u003c/html\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e8\n5 1 6 8 2 4 5 10\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e5\u003c/pre\u003e"}}]}