{"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支持3种操作\n1 u v 对于所有i u\u003c\u003di\u003c\u003dv,输出a[i]的和\n2 u v t 对于所有i u\u003c\u003di\u003c\u003dv a[i]\u003da[i]%t\n3 u v 表示a[u]\u003dv(将v赋值给a[u])\nn,q\u003c\u003d1e5 a[i],t,v\u003c\u003d1e9"}},{"title":"Input","value":{"format":"MD","content":"5 5\n1 2 3 4 5\n2 3 5 4\n3 3 5\n1 2 5\n2 1 3 3\n1 1 3"}},{"title":"Output","value":{"format":"MD","content":"8\n5"}},{"title":"提示","value":{"format":"MD","content":"对于a%\u003db,如果a\u003e\u003db,那么a至少除以2,也就是一个数最多减小log次"}}]}