{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"Lily特别喜欢养花,但是由于她的花特别多,所以照料这些花就变得不太容易。她把她的花依次排成一行,每盆花都有一个美观值。如果Lily把某盆花照料的好的话,这盆花的美观值就会上升,如果照料的不好的话,这盆花的美观值就会下降。有时,Lily想知道某段连续的花的美观值之和是多少,但是,Lily的算术不是很好,你能快速地告诉她结果吗?"}},{"title":"Input","value":{"format":"MD","content":"第一行一个整数T,表示有T组测试数据。\n每组测试数据的第一行为一个正整数N (N\u003c\u003d50000),表示Lily有N盆花。\n接下来有N个正整数,第i个正整数ai (1\u003c\u003dai\u003c\u003d50) 表示第i盆花的初始美观值。\n接下来每行有一条命令,命令有4种形式:\n(1)Add i j, i和j为正整数,表示第i盆花被照料的好,美观值增加j (j\u003c\u003d30)\n(2)Sub i j, i和j为正整数,表示第i盆花被照料的不好,美观值减少j (j\u003c\u003d30)\n(3)Query i j, i和j为正整数,i\u003c\u003dj,表示询问第i盆花到第j盆花的美观值之和\n(4)End,表示结束,这条命令在每组数据最后出现\n每组数据的命令不超过40000条"}},{"title":"Output","value":{"format":"MD","content":"对于第i组数据,首先输出\"Case i:\"和回车。\n对于每个\"Query i j\"命令,输出第i盆花到第j盆花的美观值之和。"}},{"title":"Sample Input","value":{"format":"MD","content":"\u003cdiv style\u003d\"white-space:normal;font-family:\u0027Courier New\u0027, Courier, monospace;\"\u003e\n 1\n \u003cbr\u003e 10\n \u003cbr\u003e 1 2 3 4 5 6 7 8 9 10\n \u003cbr\u003e Query 1 3\n \u003cbr\u003e Add 3 6\n \u003cbr\u003e Query 2 7\n \u003cbr\u003e Sub 10 2\n \u003cbr\u003e Add 6 3\n \u003cbr\u003e Query 3 10\n \u003cbr\u003e End \n\u003c/div\u003e \n\u003cdiv style\u003d\"white-space:normal;font-family:\u0027Courier New\u0027, Courier, monospace;\"\u003e\n \u0026nbsp; \n\u003c/div\u003e"}},{"title":"Sample Output","value":{"format":"MD","content":"\u003cspan style\u003d\"font-family:\u0027Courier New\u0027, Courier, monospace;white-space:normal;\"\u003eCase 1:\u003c/span\u003e\u003cbr style\u003d\"font-family:\u0027Courier New\u0027, Courier, monospace;white-space:normal;\"\u003e \u003cspan style\u003d\"font-family:\u0027Courier New\u0027, Courier, monospace;white-space:normal;\"\u003e6\u003c/span\u003e\u003cbr style\u003d\"font-family:\u0027Courier New\u0027, Courier, monospace;white-space:normal;\"\u003e \u003cspan style\u003d\"font-family:\u0027Courier New\u0027, Courier, monospace;white-space:normal;\"\u003e33\u003c/span\u003e\u003cbr style\u003d\"font-family:\u0027Courier New\u0027, Courier, monospace;white-space:normal;\"\u003e \u003cspan style\u003d\"font-family:\u0027Courier New\u0027, Courier, monospace;white-space:normal;\"\u003e59\u003c/span\u003e"}}]}