{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cstyle type\u003d\u0027text/css\u0027\u003e .input, .output {border: 1px solid #888888;} .output {margin-bottom:1em;position:relative;top:-1px;} .output pre,.input pre {background-color:#EFEFEF;line-height:1.25em;margin:0;padding:0.25em;} .title {background-color:#FFFFFF;border-bottom: 1px solid #888888;font-family:arial;font-weight:bold;padding:0.25em;} \u003c/style\u003e \u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027]], displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027]]}\n });\n \u003c/script\u003e\n \u003cscript type\u003d\"text/javascript\" async\n src\u003d\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\"\u003e\n \u003c/script\u003e\n\u003cp\u003e\u003cpre\u003e小公举有一个长度为 n 的序列 a. 还是因为放假太长的缘故,所以小公举有很多时间来复制这个序列并相连。问最长递增序列的长度是多少?\u003c/pre\u003e\u003c/p\u003e\n\u003cp\u003e\u003cpre\u003e如果序列A可以通过序列B删除几个元素得到 (可能不删除或者删除全部) 。那么序列A称为序列B的子序列。所求的最长递增序列为拼接后序列的子序列\u003c/pre\u003e\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e\u003cpre\u003e第一行输入组数t.。\u003c/pre\u003e\u003c/p\u003e\n\u003cp\u003e\u003cpre\u003e每组测试样例第一行输入序列a的长度n(1 \u003c\u003d n \u003c\u003d 1e5)\u003c/pre\u003e\u003c/p\u003e\n\u003cp\u003e\u003cpre\u003e第二行输入n个用空格隔开的数a1,a2,……,an(1 \u003c\u003d ai \u003c\u003d 1e9)。\u003c/pre\u003e\u003c/p\u003e\n\u003cp\u003e\u003cpre\u003e测试样例中n的总和不超过1e5.\u003c/pre\u003e\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e\u003cpre\u003e输出复制后最长递增序列的长度。\u003c/pre\u003e\u003c/p\u003e"}},{"title":"Example","value":{"format":"HTML","content":"\u003cdiv class\u003d\"sample-test\"\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e2\n4\n4 3 2 1\n6\n3 1 6 1 5 7\n\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003e4\n5\n\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003e\u003cpre\u003e第一个样例拼接后的结果为 4 3 2 1;4 3 2 1 ;4 3 2 1;4 3 2 1 最长递增子序列为 x x x 1;x x 2 x ;x 3 x x ; 4 x x x 。x表示不取。\u003c/pre\u003e\u003c/p\u003e"}}]}