{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eYou have \u003ci\u003eN\u003c/i\u003e integers, \u003ci\u003eA\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e, \u003ci\u003eA\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e, ... , \u003ci\u003eA\u003csub\u003eN\u003c/sub\u003e\u003c/i\u003e. 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.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains two numbers \u003ci\u003eN\u003c/i\u003e and \u003ci\u003eQ\u003c/i\u003e. 1 ≤ \u003ci\u003eN\u003c/i\u003e,\u003ci\u003eQ\u003c/i\u003e ≤ 100000.\u003cbr\u003eThe second line contains \u003ci\u003eN\u003c/i\u003e numbers, the initial values of \u003ci\u003eA\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e, \u003ci\u003eA\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e, ... , \u003ci\u003eA\u003csub\u003eN\u003c/sub\u003e\u003c/i\u003e. -1000000000 ≤ \u003ci\u003eA\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e ≤ 1000000000.\u003cbr\u003eEach of the next \u003ci\u003eQ\u003c/i\u003e lines represents an operation.\u003cbr\u003e\"C \u003ci\u003ea\u003c/i\u003e \u003ci\u003eb\u003c/i\u003e \u003ci\u003ec\u003c/i\u003e\" means adding \u003ci\u003ec\u003c/i\u003e to each of \u003ci\u003eA\u003csub\u003ea\u003c/sub\u003e\u003c/i\u003e, \u003ci\u003eA\u003csub\u003ea\u003c/sub\u003e\u003c/i\u003e\u003csub\u003e+1\u003c/sub\u003e, ... , \u003ci\u003eA\u003csub\u003eb\u003c/sub\u003e\u003c/i\u003e. -10000 ≤ \u003ci\u003ec\u003c/i\u003e ≤ 10000.\u003cbr\u003e\"Q \u003ci\u003ea\u003c/i\u003e \u003ci\u003eb\u003c/i\u003e\" means querying the sum of \u003ci\u003eA\u003csub\u003ea\u003c/sub\u003e\u003c/i\u003e, \u003ci\u003eA\u003csub\u003ea\u003c/sub\u003e\u003c/i\u003e\u003csub\u003e+1\u003c/sub\u003e, ... , \u003ci\u003eA\u003csub\u003eb\u003c/sub\u003e\u003c/i\u003e.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eYou need to answer all \u003ci\u003eQ\u003c/i\u003e commands in order. One answer in a line.\u003c/p\u003e"}},{"title":"Sample","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\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\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":"The sums may exceed the range of 32-bit integers."}}]}