摘要: 二维树状数组 单点更新区间查询 模板从零开始借鉴http://www.2cto.com/kf/201307/227488.html#include#include#define N 1100int c[N][N],visit[N][N],n;int number(int x) {return x&-... 阅读全文
posted @ 2013-11-19 21:00 HYDhyd 阅读(108) 评论(0) 推荐(0) 编辑
摘要: #include#include#define N 51000int c[N],n;int number(int x) {return x&-x;}void creat(int a,int x) {int i;for(i=a;i0;i-=number(i)) h+=c[i];return h;}... 阅读全文
posted @ 2013-11-19 20:42 HYDhyd 阅读(96) 评论(0) 推荐(0) 编辑
摘要: #include#include#define N 110int map[N][N];int main() {int n,m,k,i,j,u,v,t,s,total,flag,sum;scanf("%d",&t);while(t--) {total=0;scanf("%d%d%d",&n,&m,&k... 阅读全文
posted @ 2013-11-19 15:29 HYDhyd 阅读(83) 评论(0) 推荐(0) 编辑