{"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\u003eYou are given a sequence A of N (N \u0026lt;\u003d 100,000) positive integers. There sum will be less than 10\u003csup\u003e18\u003c/sup\u003e. On this sequence you have to apply M (M \u0026lt;\u003d 100,000) operations:\u003c/p\u003e\r\n\u003cp\u003e(A) For given x, y, for each elements between\u0026nbsp;the x-th and the y-th ones (inclusively, counting from 1), modify it to its positive square root (rounded down to the nearest integer).\u003c/p\u003e\r\n\u003cp\u003e(B) For given x, y, query the sum of all the elements between the x-th and the y-th ones (inclusively, counting from 1) in the sequence.\u003c/p\u003e\r\n\u003ch3\u003eInput\u003c/h3\u003e\r\n\u003cp\u003eMultiple test cases, please proceed them one by one. Input terminates by EOF.\u003c/p\u003e\r\n\u003cp\u003eFor each test case:\u003c/p\u003e\r\n\u003cp\u003eThe first line contains an integer N. The following line contains N integers, representing the sequence A\u003csub\u003e1\u003c/sub\u003e.. A\u003csub\u003eN\u003c/sub\u003e. \u003cbr\u003eThe third line contains an integer M. The next M lines contain the operations in the form \"i x y\". i\u003d0 denotes the modify operation, i\u003d1 denotes the query operation.\u003c/p\u003e\r\n\u003ch3\u003eOutput\u003c/h3\u003e\r\n\u003cp\u003eFor each test case:\u003c/p\u003e\r\n\u003cp\u003eOutput the case number (counting from 1) in the first line of output. Then for each query, print an integer as the problem required.\u003c/p\u003e\r\n\u003cp\u003ePrint an blank line after each test case.\u003c/p\u003e\r\n\u003cp\u003eSee the sample output for more details.\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\u003e5\r\n1 2 3 4 5\r\n5\r\n1 2 4\r\n0 2 4\r\n1 2 4\r\n0 4 5\r\n1 1 5\r\n4\r\n10 10 10 10\r\n3\r\n1 1 4\r\n0 2 3\r\n1 1 4\r\n\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase #1:\r\n9\r\n4\r\n6\r\n\r\nCase #2:\r\n40\r\n26\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"}}]}