描述 给定n个数据,有两个操作,加减其中的一个数据,当然还可查询在某段数据的和. 输入 输入数据有多组,每组数据的第一行输入n,1=<n<=500000,代表数据的个数.第二行输入具体数据,数据为正整数,范围在1到10000.第三行输入m,1<=m<=100000,表示操作的次数.包含了修改和查询操作.下面m行就是具体的操作了.C i x 表示为第i个元素加上x,x范围在1到10000.Q i j 表示查询区段i到j的和.保证输入的i<=j.以EOF结束. 输出 输出查询…
描述 Consider the following two-player game played with a sequence of N positive integers (2 <= N <= 100) laid onto a 1 x N game board. Player 1 starts the game. The players move alternately by selecting a number from either the left or the right end…
描述 Given an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j] = 0 (1 <= i, j <= N). We can change the matrix in the following way. Given a rectangle whose upper-left c…
描述 The bustling town of Siruseri has just one sports stadium. There are a number of schools, colleges, sports associations, etc. that use this stadium as the venue for their sports events. Anyone interested in using the stadium has to apply to the Ma…