![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树状数组
xiyue_jiang
这个作者很懒,什么都没留下…
展开
-
CSU-ACM2017暑期训练16-树状数组 H - Bubble Sort HDU - 5775
H - Bubble Sort P is a permutation of the integers from 1 to N(index starting from 1).Here is the code of Bubble Sort in C++.for(int i=1;i<=N;++i) for(int j=N,t;j>i;—j) if(P[j-1] > P[j])原创 2017-08-14 21:35:50 · 320 阅读 · 0 评论 -
CSU-ACM2017暑期训练16-树状数组 A - Ultra-QuickSort POJ - 2299
A - Ultra-QuickSortIn 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 se原创 2017-08-14 21:41:02 · 176 阅读 · 0 评论 -
CSU-ACM2017暑期训练16-树状数组 C - 按钮控制彩灯实验 CSU - 1770
C - 按钮控制彩灯实验应教学安排,yy又去开心的做电学实验了。实验的内容分外的简单一串按钮通过编程了的EEPROM可以控制一串彩灯。然而选择了最low的一种一对一的控制模式,并很快按照实验指导书做完实验的yy马上感觉到十分无趣。于是他手指在一排按钮上无聊的滑来滑去,对应的彩灯也不断的变化着开关。已知每一个按钮按下会改变对应一个彩灯的状态,如此每次yy滑动都会改变一串彩灯的状态。现已知彩灯最初的状态原创 2017-08-14 21:58:29 · 286 阅读 · 0 评论 -
CSU-ACM2017暑期训练16-树状数组 B - Stars POJ - 2352
B - StarsAstronomers 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 hig原创 2017-08-14 22:11:34 · 211 阅读 · 0 评论 -
CSU-ACM2017暑期训练16-树状数组 D - 斜率小于0的连线数量 51Nod - 1107
D - 斜率小于0的连线数量二维平面上N个点之间共有C(n,2)条连线。求这C(n,2)条线中斜率小于0的线的数量。二维平面上的一个点,根据对应的X Y坐标可以表示为(X,Y)。例如:(2,3) (3,4) (1,5) (4,6),其中(1,5)同(2,3)(3,4)的连线斜率 < 0,因此斜率小于0的连线数量为2。Input第1行:1个数N,N为点的数量(0 <= N <= 50000)第2原创 2017-08-14 22:23:13 · 180 阅读 · 0 评论 -
CSU-ACM2017暑期训练16-树状数组 F - Matrix Sum HihoCoder - 1336
F - Matrix SumYou are given an N × N matrix. At the beginning every element is 0. Write a program supporting 2 operations: 1. Add x y value: Add value to the element Axy. (Subscripts starts from 02. Su原创 2017-08-14 22:26:53 · 218 阅读 · 0 评论 -
CSU-ACM2017暑期训练16-树状数组 G - KiKi's K-Number HDU - 2852
G - KiKi’s K-Number For the k-th number, we all should be very familiar with it. Of course,to kiki it is also simple. Now Kiki meets a very similar problem, kiki wants to design a container, the cont原创 2017-08-14 22:35:32 · 180 阅读 · 0 评论 -
Queries about less or equal elements - Codeforces - 600B
Queries about less or equal elementsYou are given two arrays of integers a and b. For each element of the second array bj you should find the number of elements in array a that are less than or equal t原创 2017-09-13 20:36:19 · 480 阅读 · 0 评论