
数据结构_树状数组
SCUT_Pein
这个作者很懒,什么都没留下…
展开
-
POJ2309--BST--树状数组
DescriptionConsider an infinite full binary search tree (see the figure below), the numbers in the nodes are 1, 2, 3, .... In a subtree whose root node is X, we can get the minimum number in this su原创 2013-03-27 16:36:19 · 913 阅读 · 0 评论 -
POJ2761--Feed the dogs
DescriptionWind loves pretty dogs very much, and she has n pet dogs. So Jiajia has to feed the dogs every day for Wind. Jiajia loves Wind, but not the dogs, so Jiajia use a special way to feed the d原创 2013-11-14 21:32:13 · 1152 阅读 · 0 评论 -
UVA1513--Movie collection--线段树
Mr. K. I. has a very big movie collection. He has organized his collection in a big stack. Whenever he wants to watch one of the movies, he locates the movie in this stack and removes it carefully,原创 2014-03-01 21:08:36 · 1051 阅读 · 0 评论 -
LA 4329 树状数组
N (3N20000) 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 each oth原创 2014-02-19 20:28:17 · 652 阅读 · 0 评论 -
UVA12086 Potentionmeters 线段树
A potentiometer, or potmeter for short, is an electronic device with a variable electric resistance. It has two terminals and some kind of control mechanism (often a dial, a wheel or a slide) with whi原创 2014-02-28 19:37:54 · 1077 阅读 · 0 评论 -
POJ2029--Get Many Persimmon Trees
DescriptionSeiji Hayashi had been a professor of the Nisshinkan Samurai School in the domain of Aizu for a long time in the 18th century. In order to reward him for his meritorious career in educa原创 2013-07-25 19:01:27 · 760 阅读 · 0 评论 -
POJ3321--Apple Tree
DescriptionThere is an apple tree outside of kaka's house. Every autumn, a lot of apples will grow in the tree. Kaka likes apple very much, so he has been carefully nurturing the big apple tree.原创 2013-07-17 16:32:02 · 882 阅读 · 0 评论 -
POJ1195--Mobile phones--二维树状数组
DescriptionSuppose 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 an原创 2013-07-17 14:00:44 · 795 阅读 · 0 评论 -
POJ2352--Stars
DescriptionAstronomers 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原创 2013-07-17 11:50:39 · 873 阅读 · 0 评论 -
大视野1901: Zju2112 (树状数组+主席树)
Description给定一个含有n个数的序列a[1],a[2],a[3]……a[n],程序必须回答这样的询问:对于给定的i,j,k,在a[i],a[i+1],a[i+2]……a[j]中第k小的数是多少(1≤k≤j-i+1),并且,你可以改变一些a[i]的值,改变后,程序还能针对改变后的a继续回答上面的问题。你需要编一个这样的程序,从输入文件中读入序列a,然后读入一系列的指令,包括询问指令原创 2014-04-18 16:12:44 · 907 阅读 · 0 评论