{"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":"MD","content":"给定一个长度为n的数组a,并且要求执行q个操作,有两种不同的操作:\n\n①询问一个区间[l,r]中集合{c\u003csub\u003e0\u003c/sub\u003e,c\u003csub\u003e1\u003c/sub\u003e,c\u003csub\u003e2\u003c/sub\u003e,⋯,c\u003csub\u003e10\u003csup\u003e9\u003c/sup\u003e\u003c/sub\u003e}\n的Mex,而c\u003csub\u003ei\u003c/sub\u003e表示数值i在[l,r]中的出现次数。mex表示集合中未出现的数中的最小值。\n\n②把a\u003csub\u003ep\u003c/sub\u003e修改成x。\n\n对每一个询问输出答案。"}},{"title":"Input","value":{"format":"MD","content":"第一行输入n,q,代表数组长度和操作次数,1 ≤ n, q ≤ 100 000\n第二行为n个数字-a1, a2, ..., an (1 ≤ ai ≤ 10\u003csup\u003e9\u003c/sup\u003e).\n接下来q行为操作\n第一个数字ti,表示操作类型,1表示第一种查询操作,然后是两个数字l,r\n2表示第二种修改操作,然后是p,x"}},{"title":"Output","value":{"format":"MD","content":"对于每个查询输出一个整数,{c\u003csub\u003e0\u003c/sub\u003e,c\u003csub\u003e1\u003c/sub\u003e,c\u003csub\u003e2\u003c/sub\u003e,⋯,c\u003csub\u003e10\u003csup\u003e9\u003c/sup\u003e\u003c/sub\u003e}的mex"}},{"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\u003e10 4\n1 2 3 1 1 2 2 2 9 9\n1 1 1\n1 2 8\n2 7 1\n1 2 8\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\n3\n2\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"MD","content":""}}]}