{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eYuuki, a cute senior high school student with excellent talent in mahjong, comes up with a cool problem. The problem goes as follows:\u003c/p\u003e\n\u003cp\u003eGiven a sequence with $N$ integers $a_1, a_2, \\cdots, a_N$ and $Q$ operations. There are two types of operations.\u003c/p\u003e\n\u003cul\u003e\n \u003cli\u003eModify operation: Given $x, y$, change $a_x$ to $y$.\u003c/li\u003e\n \u003cli\u003eQuery operation: Given $L, R$. Consider $a_L, a_{L + 1}, \\cdots, a_{R}$ as coins with values $a_L, a_{L + 1}, \\cdots, a_R$, please find out the minimum number $yuuki$, such that it is impossible to choose a subset of the coins stated before, such that the sum of their values is $yuuki$.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3\u003eInput\u003c/h3\u003e\n\u003cp\u003eThe first line of the input contains two integers $N, Q$ denotes the length of the sequence and the number of operations.\u003c/p\u003e\n\u003cp\u003eThen, there are $N$ space-separated integers $a_1, a_2, \\cdots, a_N$.\u003c/p\u003e\n\u003cp\u003eThen, the following $Q$ lines are the operations. Each operation must follow the following two formats:\u003c/p\u003e\n\u003col\u003e\n \u003cli\u003e$1 \\ x \\ y$: Modify operation.\u003c/li\u003e\n \u003cli\u003e$2 \\ L \\ R$: Query operation.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eThe meaning of the variable are stated in the problem description!\u003c/p\u003e\n\u003cul\u003e\n \u003cli\u003e$1 \\le N, Q, a_i \\le 2 \\times 10^5$\u003c/li\u003e\n \u003cli\u003e$1 \\le x \\le N$\u003c/li\u003e\n \u003cli\u003e$1 \\le y \\le 2 \\times 10^5$\u003c/li\u003e\n \u003cli\u003e$1 \\le L \\le R \\le N$\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3\u003eOutput\u003c/h3\u003e\n\u003cp\u003eFor each query operation, output the corresponding $yuuki$ value in one line.\u003c/p\u003e"}},{"title":"Sample 1","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\u003e3 7\n1 3 2\n2 1 1\n2 2 2\n2 1 3\n1 3 1\n2 1 3\n1 1 5\n2 1 3\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\n1\n7\n6\n2\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr /\u003e"}}]}