{"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":"Đề bài","value":{"format":"HTML","content":"\u003cp\u003e\nCho dãy \u003cb\u003ea\u003csub\u003e1\u003c/sub\u003e, a\u003csub\u003e2\u003c/sub\u003e, \u0026hellip;, a\u003csub\u003en\u003c/sub\u003e\u003c/b\u003e. Cho \u003cb\u003em\u003c/b\u003e truy vấn có dạng \u003cb\u003eL R\u003c/b\u003e, với mỗi truy vấn hãy tính biểu thức sau:\n\u003c/p\u003e\n\u003cp align\u003d\"center\"\u003e\n\u003cb\u003emax(a\u003csub\u003ei\u003c/sub\u003e + a\u003csub\u003ei + 1\u003c/sub\u003e + \u0026hellip; + a\u003csub\u003ej\u003c/sub\u003e) \u0026forall; L \u0026le; i \u0026le; j \u0026le; R\u003c/b\u003e.\n\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e\nDòng đầu chứa số nguyên \u003cb\u003en\u003c/b\u003e (\u003cb\u003e1 \u0026le; n \u0026le; 50000\u003c/b\u003e).\n\u003c/p\u003e\n\u003cp\u003e\nDòng thứ hai chứa \u003cb\u003en\u003c/b\u003e số nguyên \u003cb\u003ea\u003csub\u003e1\u003c/sub\u003e, a\u003csub\u003e2\u003c/sub\u003e, \u0026hellip;, a\u003csub\u003en\u003c/sub\u003e\u003c/b\u003e (\u003cb\u003e\u0026verbar;a\u003csub\u003ei\u003c/sub\u003e\u0026verbar; \u0026le; 15007\u003c/b\u003e).\n\u003c/p\u003e\n\u003cp\u003e\nDòng thứ ba chứa số nguyên dương \u003cb\u003em\u003c/b\u003e.\n\u003c/p\u003e\n\u003cp\u003e\n\u003cb\u003em\u003c/b\u003e dòng tiếp theo, mỗi dòng chứa hai số nguyên \u003cb\u003eL\u003c/b\u003e, \u003cb\u003eR\u003c/b\u003e (\u003cb\u003e1 \u0026le; L \u0026le; R \u0026le; n\u003c/b\u003e)."}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e\nVới mỗi truy vấn in ra trên một dòng một số nguyên là kết quả.\n\u003c/p\u003e"}},{"title":"Input mẫu","value":{"format":"HTML","content":"\u003cpre\u003e\n3 \n-1 2 3\n1\n1 2\n\u003c/pre\u003e"}},{"title":"Output mẫu","value":{"format":"HTML","content":"\u003cpre\u003e\n2\n\u003c/pre\u003e"}}]}