{"trustable":false,"sections":[{"title":"Description","value":{"format":"MD","content":"给出一个由 $n(n\\le 5000)$ 个不超过 $10^6$ 的正整数组成的序列。请输出这个序列的**最长上升子序列**的长度。\n\n最长上升子序列:从原序列中**按顺序**取出一些数字排在一起,这些数字是**逐渐增大**的。"}},{"title":"Input","value":{"format":"MD","content":"第一行,一个整数 $n$,表示序列长度。\n\n第二行有 $n$ 个整数,表示这个序列。"}},{"title":"Output","value":{"format":"MD","content":"一个整数表示答案。"}},{"title":"Sample 1","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e6\n1 2 4 1 3 4\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e4\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"MD","content":"分别取出 $1$、$2$、$3$、$4$ 即可。"}}]}