{"trustable":false,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n #problem-body \u003e pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n","sections":[{"title":"题目描述","value":{"format":"MD","content":"给定长度为 $n$ 从 $1$ 开始编号的数组 $a$ 。你需要支持两种操作:\n+ $0\\ \\ pos\\ \\ val\\ \\ a_{pos}:\u003dval$\n+ $1\\ \\ x\\ \\ y$ 输出 $max$ { $a_i+a_{i+1}+\\ldots + a_j | x \\leq i\\leq j \\leq y$ } "}},{"title":"输入格式","value":{"format":"MD","content":"第一行一个整数 $n$ 代表数组长度。\n第二行 $n$ 个空格分开的整数 $a_i$。\n第三行一个整数 $q$ 代表操作数量。\n随后 $q$ 行两种类型:\n+ $0\\ \\ x\\ \\ y\\ \\ $\n+ $1\\ \\ x\\ \\ y$ "}},{"title":"输出格式","value":{"format":"MD","content":"对于每个操作 $1$ 输出其对于的值。"}},{"title":"样例","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\u003e\n4\n1 2 3 4\n4\n1 1 3\n0 3 -3\n1 2 4\n1 3 3\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\n6\n4\n-3\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"数据范围","value":{"format":"MD","content":"对于所有数据,$1 \\leq n,q \\leq 50000$, $-10000\\leq a_i \\leq 10000$,$-10000\\leq val \\leq 10000$,$1\\leq x \\leq y \\leq n$。"}}]}