{"trustable":true,"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":"\u003cdiv class\u003d\"panel_content\"\u003eLucida有一个序列,其中包含$n$个整数$a_1, a_2, \\dots, a_n$。他要求你为他执行两种操作,具体描述如下:\u003cbr\u003e\u003cbr\u003e\u003cul\u003e\u003cbr\u003e\u003cli\u003e$\\texttt{1 L R}$,将区间$[L, R]$中的每个$a_i$加上$lowbit(a_i)$。\u003c/li\u003e\u003cbr\u003e\u003cli\u003e$\\texttt{2 L R}$,查询区间$[L, R]$中数字的总和。\u003c/li\u003e\u003cbr\u003e\u003c/ul\u003e\u003cbr\u003elowbit(v10/)被定义为能整除$x$的最大2的幂次方。例如,lowbit(4)\u003d4,lowbit(5)\u003d1。特别地,lowbit(0)\u003d0。\u003cbr\u003e\u003cbr\u003eLucida希望你对他的每个查询都给出模$998244353$后的答案。\u003c/div\u003e"}},{"title":"输入","value":{"format":"HTML","content":"这个问题包含多个测试用例。\u003cbr\u003e\u003cbr\u003e第一行包含一个整数$T$($1\\leq T \\leq 20$),表示测试用例的数量。\u003cbr\u003e\u003cbr\u003e对于每个测试用例,第一行包含一个整数$n$($1 \\leq n \\leq 10^5$),表示序列的长度。\u003cbr\u003e\u003cbr\u003e接下来一行包含$n$个整数$a_i$($1 \\leq a_i \u0026lt; 998244353$),用空格分隔,表示序列。\u003cbr\u003e\u003cbr\u003e接下来一行包含一个整数$m$($1 \\leq m \\leq 10^5$),表示操作的次数。\u003cbr\u003e\u003cbr\u003e接下来$m$行,每行包含3个整数$op, L, R$($1 \\leq op \\leq 2$,$1 \\leq L \\leq R \\leq n$),表示一个操作。具体含义如上所述。"}},{"title":"输出","value":{"format":"HTML","content":"对于每个查询,输出一行包含模$998244353$后的答案。"}},{"title":"示例","value":{"format":"HTML","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\u003e1\r\n5\r\n1 2 3 4 5\r\n5\r\n2 2 4\r\n1 1 3\r\n2 2 4\r\n1 1 5\r\n2 4 5\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e9\r\n12\r\n14\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}}]}