{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003edd \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-color: #f5f5f5;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\u003c/style\u003e","sections":[{"title":"Description","value":{"format":"HTML","content":"\u003cp\u003e\u003cspan id\u003d\"1369649389470S\" style\u003d\"display: none\"\u003e\u0026nbsp;\u003c/span\u003e\u003cspan style\u003d\"font-size: medium\"\u003e\u003cfont face\u003d\"Times New Roman\"\u003e\u003cbr\u003e\r\nYou have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to ask for the sum of numbers in a given interval. \u003cbr\u003e\r\n\u003cbr\u003e\r\n\u003c/font\u003e\u003c/span\u003e\u003c/p\u003e\r\n\u003cp\u003e\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e\u003cspan style\u003d\"font-size: medium\"\u003e\u003cfont face\u003d\"Times New Roman\"\u003e\u003cbr\u003e\r\nThe first line contains two numbers N and Q. 1 ≤ N,Q ≤ 100000. \u003cbr\u003e\r\nThe second line contains N numbers, the initial values of A1, A2, ... , AN. -1000000000 ≤ Ai ≤ 1000000000. \u003cbr\u003e\r\nEach of the next Q lines represents an operation. \u003cbr\u003e\r\n\"C a b c\" means adding c to each of Aa, Aa+1, ... , Ab. -10000 ≤ c ≤ 10000. \u003cbr\u003e\r\n\"Q a b\" means querying the sum of Aa, Aa+1, ... , Ab. \u003cbr\u003e\r\n\u003cbr\u003e\r\n\u003c/font\u003e\u003c/span\u003e\u003c/p\u003e\r\n\u003cp\u003e\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e\u003cspan style\u003d\"font-size: medium\"\u003e\u003cfont face\u003d\"Times New Roman\"\u003e\u003cbr\u003e\r\nYou need to answer all Q commands in order. One answer in a line. \u003cbr\u003e\r\n\u003cbr\u003e\r\n\u003c/font\u003e\u003c/span\u003e\u003c/p\u003e\r\n\u003cp align\u003d\"left\"\u003e\u003cspan id\u003d\"1369649389073E\" style\u003d\"display: none\"\u003e\u0026nbsp;\u003c/span\u003e\u003c/p\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\"vjudge_sample\"\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\u003e10 5\r\n1 2 3 4 5 6 7 8 9 10\r\nQ 4 4\r\nQ 1 10\r\nQ 2 4\r\nC 3 6 3\r\nQ 2 4\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e4\r\n55\r\n9\r\n15\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"HTML","content":"\u003cp\u003e\u003cfont face\u003d\"Times New Roman\" size\u003d\"3\"\u003eThe sums may exceed the range of 32-bit integers.\u0026nbsp;\u003c/font\u003e\u003cbr\u003e\u003cbr\u003e\r\n\u003c/p\u003e"}}]}