{"trustable":false,"prependHtml":"\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 async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cscript type\u003d\u0027text/x-mathjax-config\u0027\u003eMathJax.Hub.Config({tex2jax: { inlineMath: [[\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, \u0027left_view\u0027]);}, 2000);\u003c/script\u003e\n\u003cdiv class\u003d\"panel_content\"\u003e\n Given n integers. \n \u003cbr\u003eYou have two operations: \n \u003cbr\u003eU A B: replace the Ath number by B. (index counting from 0) \n \u003cbr\u003eQ A B: output the length of the longest consecutive increasing subsequence (LCIS) in [a, b]. \n \u003cbr\u003e \n\u003c/div\u003e\nU表示把第A个数改成B,下标从0开始。\u003c/br\u003e\nQ表示求区间[A,B]范围内的最长连续上升子区间。"}},{"title":"Input","value":{"format":"HTML","content":"T in the first line, indicating the case number. \n\u003cbr\u003eEach case starts with two integers n , m(0\u0026lt;n,m\u0026lt;\u003d10 \n\u003csup\u003e5\u003c/sup\u003e). \n\u003cbr\u003eThe next line has n integers(0\u0026lt;\u003dval\u0026lt;\u003d10 \n\u003csup\u003e5\u003c/sup\u003e). \n\u003cbr\u003eThe next m lines each has an operation: \n\u003cbr\u003eU A B(0\u0026lt;\u003dA,n , 0\u0026lt;\u003dB\u003d10 \n\u003csup\u003e5\u003c/sup\u003e) \n\u003cbr\u003eOR \n\u003cbr\u003eQ A B(0\u0026lt;\u003dA\u0026lt;\u003dB\u0026lt; n). \n\u003cbr\u003e\n多组输入数据\u003c/br\u003e\n第一行两个整数n和m (n,m\u0026lt;\u003d 100000)\u003c/br\u003e\n第二行n个不超过100000的非负数\u003c/br\u003e \n接下里m个询问,如题目描述。"}},{"title":"Output","value":{"format":"HTML","content":"For each Q, output the answer."}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e1\n10 10\n7 7 3 3 5 9 9 8 1 8 \nQ 6 6\nU 3 4\nQ 0 1\nQ 0 5\nQ 4 7\nQ 3 5\nQ 0 2\nQ 4 6\nU 6 10\nQ 0 9\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e1\n1\n4\n2\n3\n1\n2\n5\u003c/pre\u003e"}}]}