![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树状数组
文章平均质量分 79
kuronekonano
这个作者很懒,什么都没留下…
展开
-
Hrbust 1794敌兵布阵(树状数组应用)
敌兵布阵 Time Limit: 3000 MS Memory Limit: 32768 K Total Submit: 388(144 users) Total Accepted: 168(131 users) Rating: Special Judge: No Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又...原创 2017-04-09 23:18:15 · 272 阅读 · 0 评论 -
牛客网暑假训练第一场——J Different Integers(莫队算法 & 树状数组)
链接:https://www.nowcoder.com/acm/contest/139/J 来源:牛客网时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 524288K,其他语言1048576K 64bit IO Format: %lld 题目描述 Given a sequence of integers a1, a2, …, an and q pairs of in...原创 2018-07-22 22:02:52 · 179 阅读 · 0 评论 -
AtCoder Regular Contest 068 E - Snuke Line(线段树/树状数组 区间更新 单点查询+区间覆盖计数)
E - Snuke Line Time limit : 2sec / Memory limit : 256MBScore : 700 pointsProblem Statement Snuke has decided to play a game, where the player runs a railway company. There are M+1 stations on Sn...原创 2018-06-07 17:08:04 · 686 阅读 · 0 评论 -
POJ - 2299 Ultra-QuickSort(树状数组求逆序数+离散化 & 归并排序求逆序数)
In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sorted i...原创 2018-06-06 00:09:35 · 255 阅读 · 0 评论 -
POJ - 3468 A Simple Problem with Integers(树状数组(差分法)区间更新&区间查询)
You have N integers, A1, A2, … , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to ask for the su...原创 2018-04-30 02:35:56 · 199 阅读 · 0 评论 -
HDU-1541 Stars(树状数组)
Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are not higher and ...原创 2018-05-07 17:28:15 · 160 阅读 · 0 评论 -
HDU 2492 Ping pong(树状数组)
N(3<=N<=20000) ping pong players live along a west-east street(consider the street as a line segment). Each player has a unique skill rank. To improve their skill rank, they often compete with...原创 2018-04-24 01:30:26 · 145 阅读 · 0 评论 -
"科林明伦杯"哈尔滨理工大学第八届程序设计竞赛——Hrbust -2371 GT’s Dream(并查集+树状数组+二分)
Description 在现实中认了无数师傅却毫无长进的GT在梦中成为了某武侠世界的神。在这个世界中初始有n个人,他们各成一派。作为世界神GT总共会进行m次操作,每次操作有如下两种情况1 x y 表示x所在的帮派吞并了y所在的帮派,若x与y本来就处于同一个帮派则该操作无效。2 k 表示GT想要知道当前第k大的帮派有多少人,若当前帮派数量少于k个则输出-1。Input第一行输入一个...原创 2018-03-27 12:49:44 · 542 阅读 · 5 评论 -
POJ - 1195 Mobile phones(二维树状数组)
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 with the rows and columns numbe...原创 2018-03-21 00:41:38 · 215 阅读 · 0 评论 -
POJ - 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 <= i, j <= N). We can change the matrix in t...原创 2018-03-20 01:34:22 · 191 阅读 · 0 评论 -
UPC-5911 计数问题(二维数状数组)
题目描述 一个n*m的方格,初始时每个格子有一个整数权值。接下来每次有2种操作: 改变一个格子的权值; 求一个子矩阵中某种特定权值出现的个数。 输入 第一行有两个数n,m。 接下来n行,每行m个数,第i+1行第j个数表示格子(i,j)的初始权值。 接下来输入一个整数q。 接下来q行,每行描述一个操作。 操作1:“1 x y c”(不含双引号)。表示将格子(x,y)的权值改成c(...原创 2018-03-19 01:47:20 · 287 阅读 · 0 评论 -
HDU - 4970 Killing Monsters(树状数组)
Kingdom Rush is a popular TD game, in which you should build some towers to protect your kingdom from monsters. And now another wave of monsters is coming and you need again to know whether you can ge...原创 2018-03-12 00:05:52 · 293 阅读 · 0 评论 -
牛客网暑假训练第五场——F take(树状数组求概率期望)
链接:https://www.nowcoder.com/acm/contest/143/F 来源:牛客网时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描述 Kanade has n boxes , the i-th box has p[i] probability to hav...原创 2018-08-23 09:46:34 · 217 阅读 · 0 评论