![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树状数组
文章平均质量分 83
viva_la_vida__
这个作者很懒,什么都没留下…
展开
-
poj 2309
理解lowbit的用法!!!1他可以求管辖范围带进去一看还真是 #include int lowbit(int n) { return n & (-n); } int main() { int case; scanf("%转载 2017-04-10 15:47:18 · 207 阅读 · 0 评论 -
Triple HDU - 5517 二维树状数组
Given the finite multi-set AA of nn pairs of integers, an another finite multi-set BBof mm triples of integers, we define the product of AA and BB as a multi-set C=A∗B={⟨a,c,d⟩∣⟨a,b⟩∈A, ⟨c,d原创 2018-01-20 11:00:16 · 196 阅读 · 0 评论 -
hdu 5975 Aninteresting game Time Limit: 2000/1000 MS (Java/Others) Memory LimiAninteresting game
Aninteresting gameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 541 Accepted Submission(s): 219Problem DescriptionLet’s pla原创 2018-01-13 20:30:15 · 290 阅读 · 0 评论 -
【USACO】2004 Open MooFest 奶牛集会
Description约翰家的N头奶牛每年都会参加“哞哞大会”。哞哞大会是世界奶牛界的盛事。集会上 的活动很多,比如堆干草,跨栅栏,摸牛仔的屁股等等。当然,哞哞大叫肯定也包括在内。奶牛们的叫声很大,很多奶牛在参加多年活动之后,实际上已经失去了一部分的听力。奶牛们已经站在了一条直线上,i号奶牛的坐标为Xi,她只能听到大于Vi的声音。每头奶 牛的位置坐标都是唯一的。 如果i号和j号奶牛原创 2017-11-29 21:08:38 · 450 阅读 · 0 评论 -
斜率小于0的连线数量 51Nod - 1107 树状数组+逆序数+离散化
二维平面上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)的连线斜率 Input第1行:1个数N,N为点的数量(0 第2 - N + 1行:N个点的坐标,坐标为整数。(0 ii, Yii <=原创 2017-07-26 11:16:58 · 277 阅读 · 0 评论 -
japan
Japan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the East coast and M cities on the West coast (M <= 1000, N <=原创 2017-06-14 17:47:39 · 407 阅读 · 0 评论 -
树状数组 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原创 2017-06-14 17:21:53 · 220 阅读 · 0 评论 -
树状数组 cows
Farmer John's cows have discovered that the clover growing along the ridge of the hill (which we can think of as a one-dimensional number line) in his field is particularly good.Farmer John has原创 2017-06-14 17:15:34 · 215 阅读 · 0 评论 -
树状数组 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原创 2017-06-25 17:34:39 · 183 阅读 · 0 评论 -
树状数组 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 an原创 2017-06-13 09:47:30 · 177 阅读 · 0 评论 -
hdu2838 cow sorting
Problem DescriptionSherlock's N (1 ≤ N ≤ 100,000) cows are lined up to be milked in the evening. Each cow has a unique "grumpiness" level in the range 1...100,000. Since grumpy cows are more likely原创 2017-04-18 14:44:44 · 167 阅读 · 0 评论 -
hdu 2689 sort it
Sort itTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4487 Accepted Submission(s): 3119Problem DescriptionYou want to processe a原创 2017-04-18 14:46:14 · 164 阅读 · 0 评论 -
Apple Tree poj3321 树状数组+DFS序
Apple TreeTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 32666 Accepted: 9812DescriptionThere is an apple tree outside of kaka's house. Every autumn, a lot of apples will grow in the tree. ...原创 2018-03-22 18:50:01 · 172 阅读 · 0 评论