{"trustable":true,"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":"HTML","content":"\u003cdiv id\u003d\"problem-body\"\u003e\n\t\u003cp\u003eWorld is getting more evil and it\u0027s getting tougher to get into the Evil League of Evil. Since the legendary Bad Horse has retired, now you have to correctly answer the evil questions of Dr. Horrible, who has a PhD in horribleness (but not in Computer Science). You are given an array of \u003cstrong\u003eN\u003c/strong\u003e elements, which are initially all 0. After that you will be given \u003cstrong\u003eC\u003c/strong\u003e commands. They are -\u003c/p\u003e\r\n\u003cp\u003e* \u003cstrong\u003e0 p q v\u003c/strong\u003e - you have to add \u003cstrong\u003ev\u003c/strong\u003e to all numbers in the range of \u003cstrong\u003ep\u003c/strong\u003e to \u003cstrong\u003eq\u003c/strong\u003e (inclusive), where \u003cstrong\u003ep\u003c/strong\u003e and \u003cstrong\u003eq\u003c/strong\u003e are two indexes of the array.\u003c/p\u003e\r\n\u003cp\u003e* \u003cstrong\u003e1 p q\u003c/strong\u003e - output a line containing a single integer which is the sum of all the array elements between \u003cstrong\u003ep\u003c/strong\u003e and \u003cstrong\u003eq \u003c/strong\u003e(inclusive)\u003c/p\u003e\r\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\r\n\u003ch3\u003eInput\u003c/h3\u003e\r\n\u003cp\u003eIn the first line you\u0027ll be given \u003cstrong\u003eT\u003c/strong\u003e, number of test cases.\u003c/p\u003e\r\n\u003cp\u003eEach test case will start with \u003cstrong\u003eN \u003c/strong\u003e(\u003cstrong\u003eN\u003c/strong\u003e \u0026lt;\u003d 100 000) and \u003cstrong\u003eC\u003c/strong\u003e (\u003cstrong\u003eC\u003c/strong\u003e \u0026lt;\u003d 100 000). After that you\u0027ll be given \u003cstrong\u003eC \u003c/strong\u003ecommands in the format as mentioned above. 1 \u0026lt;\u003d \u003cstrong\u003ep\u003c/strong\u003e, \u003cstrong\u003eq\u003c/strong\u003e \u0026lt;\u003d \u003cstrong\u003eN\u003c/strong\u003e and 1 \u0026lt;\u003d \u003cstrong\u003ev\u003c/strong\u003e \u0026lt;\u003d 10^7.\u003c/p\u003e\r\n\u003ch3\u003eOutput\u003c/h3\u003e\r\n\u003cp\u003ePrint the answers of the queries.\u003c/p\u003e\r\n\u003ch3\u003eExample\u003c/h3\u003e\r\n\u003cdiv\u003e\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\u003e1\n8 6\n0 2 4 26\n0 4 8 80\n0 4 5 20\n1 8 8 \n0 5 7 14\n1 4 8\n\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e80\n508\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\u003c/div\u003e"}}]}