题目链接:点击打开链接 Description Suppose that the fourth generation mobile phone base stations in the Tampere area operate as follows. The area is divided into squares. The squares form an S * S matrix wit
这是道模版题,直接套模版就好了。。。。 注意:我用的树状数组下标是从1开始的,而题目给定是从0开始的,所以有时要+1 #include<stdio.h> #define N 1100 int n; int bit[N][N]; void add(int x,int y,int v) { int i,j; for(i=x;i<=n;i+=i&-i)