{"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":"HTML","content":"\u003chtml\u003e\n \u003chead\u003e\u003c/head\u003e\n \u003cbody\u003e\n \u003cdiv id\u003d\"problem-body\"\u003e \n \u003cp\u003eMasz tablicę \u003cstrong\u003eN\u003c/strong\u003e-elementową. Początkowo wszystkie elementy tablicy mają wartość 0. Twój program musi obsłużyć \u003cstrong\u003eC\u003c/strong\u003e komend. Są ich dwa rodzaje:\u003c/p\u003e \n \u003cp\u003e* \u003cstrong\u003e0 p q v\u003c/strong\u003e musisz dodać \u003cstrong\u003ev\u003c/strong\u003e do wszystkich komórek w tablicy o indeksach od \u003cstrong\u003ep\u003c/strong\u003e do \u003cstrong\u003eq\u003c/strong\u003e (włącznie).\u003c/p\u003e \n \u003cp\u003e* \u003cstrong\u003e1 p q\u003c/strong\u003e - wypisz w nowej linii jedną liczbę całkowitą - sumę wszystkich elementów tablicy o indeksach od \u003cstrong\u003ep\u003c/strong\u003e do \u003cstrong\u003eq \u003c/strong\u003e(włącznie).\u003c/p\u003e \n \u003cp\u003e\u0026nbsp;\u003c/p\u003e \n \u003c/div\u003e\n \u003c/body\u003e\n\u003c/html\u003e"}},{"title":"","value":{"format":"HTML","content":"\u003chtml\u003e\n\u003cbody\u003e\n\u003cdiv\u003e\n\u003ch3\u003eWejście\u003c/h3\u003e \n \u003cp\u003eW pierwszej linii wejścia jest podana liczba \u003cstrong\u003eT\u003c/strong\u003e, liczba przypadków testowych.\u003c/p\u003e \n \u003cp\u003eKażdy przypadek zacznie się liczbami \u003cstrong\u003eN \u003c/strong\u003e(\u003cstrong\u003eN\u003c/strong\u003e \u0026lt;\u003d 100 000) oraz \u003cstrong\u003eC\u003c/strong\u003e (\u003cstrong\u003eC\u003c/strong\u003e \u0026lt;\u003d 100 000). Następnie otrzymasz \u003cstrong\u003eC \u003c/strong\u003ekomend w formacie takim, jak powyżej. 1 \u0026lt;\u003d \u003cstrong\u003ep\u003c/strong\u003e, \u003cstrong\u003eq\u003c/strong\u003e \u0026lt;\u003d \u003cstrong\u003eN\u003c/strong\u003e oraz 1 \u0026lt;\u003d \u003cstrong\u003ev\u003c/strong\u003e \u0026lt;\u003d 10^7.\u003c/p\u003e \n \u003c/div\u003e\n \u003c/body\u003e\n\u003c/html\u003e"}},{"title":"","value":{"format":"HTML","content":"\u003chtml\u003e\n\u003cbody\u003e\n\u003cdiv\u003e\n \u003ch3\u003eWyjście\u003c/h3\u003e \n \u003cp\u003eWypisz odpowiedź każdego zapytania w nowej linii.\u003c/p\u003e\n \u003c/div\u003e\n \u003c/body\u003e\n\u003c/html\u003e"}},{"title":"","value":{"format":"HTML","content":"\u003chtml\u003e\n\u003cbody\u003e\n\u003cdiv\u003e \u003ch3\u003ePrzykład\u003c/h3\u003e \n \u003cpre\u003e\u003cstrong\u003eWejście:\u003c/strong\u003e\u003cbr\u003e1\u003cbr\u003e8 6\u003cbr\u003e0 2 4 26\u003cbr\u003e0 4 8 80\u003cbr\u003e0 4 5 20\u003cbr\u003e1 8 8 \u003cbr\u003e0 5 7 14\u003cbr\u003e1 4 8\u003cbr\u003e\u003cbr\u003e\u003cstrong\u003eWyjście:\u003c/strong\u003e\u003cbr\u003e80\u003cbr\u003e508\u003c/pre\u003e \n \u003c/div\u003e\n \u003c/body\u003e\n\u003c/html\u003e"}}]}