![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树状数组
日月火山
这个作者很懒,什么都没留下…
展开
-
ACM PKU 2155 Matrix(树状数组)
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 We can change the matrix in the following way. G原创 2017-08-11 12:45:41 · 565 阅读 · 0 评论 -
牛客网多校第五场 inv (思维+逆序)
链接:https://www.nowcoder.com/acm/contest/143/D来源:牛客网 Kanade has an even number n and a permutation b of all of the even numbers in [1,n]Let a denote an array [1,3,5....n-1] , now you need to find...原创 2018-08-03 14:46:49 · 341 阅读 · 0 评论 -
Rabbit Kingdom HDU - 4777 (离线处理+树状数组)
Rabbit Kingdom HDU - 4777 题意:给定n个数a[i] ( 1=< i <=n) 现在给定m个询问,每个询问一个区间[l,r],问该区间有多少个数与其它所有的数互素。1 =< n,m,a[i] <= 200000思路:对于每个数a[i] 处理后可以得到一个区间[L,R]在这个区间里面,a[i]对所有包含i的[L,R]的子区间都能贡献一个...原创 2018-11-13 20:59:50 · 232 阅读 · 0 评论