![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树状数组
iteye_4729
这个作者很懒,什么都没留下…
展开
-
hdu 1166 敌兵布阵(用树状数组)
敌兵布阵 仍然是敌兵布阵那题,题目大意:给你一串数,然后会根据题意选择一点增加或减少,或者询问某区间的人数有多少?之前用线段树写了,而这题可以用树状树状来做,更加方便更加快速。 说下树状数组的三个主要函数:(神一样的函数,不只这些用处!!!) 1.lowbit(int i) 2.update(int i, int x) 3.sum(int i) 链接:http://acm....2011-08-07 21:16:33 · 163 阅读 · 0 评论 -
poj 2155 Martrix(二维树状数组)
Matrix Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 10282 Accepted: 3859 Description Given an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the ...2011-08-10 19:22:00 · 157 阅读 · 0 评论 -
hdu 3584 Cube(三维树状数组)
Cube Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 660 Accepted Submission(s): 309 Problem Description Given an N*N*N cube A, whose ele...2011-08-10 19:21:37 · 63 阅读 · 0 评论 -
hdu 2492 ping pong(逆序数与顺序数)
Ping pong Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1143 Accepted Submission(s): 387 Problem Description N(3<=N<=20000) ping p...2011-08-10 19:20:32 · 191 阅读 · 0 评论 -
poj 2481 Cows(stars的变形+离散化)
Cows Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 6854 Accepted: 2211 Description Farmer John's cows have discovered that the clover growing along the ridge of ...2011-08-09 00:39:43 · 126 阅读 · 0 评论 -
hdu 3743 Frosh Week(离散化+树状数组)
Frosh Week Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 289 Accepted Submission(s): 72 Problem Description During Frosh Week, students...2011-08-09 00:09:00 · 94 阅读 · 0 评论 -
poj 2299 Ultra-QuickSort(求逆序数:离散化+树状数组)
Ultra-QuickSort Time Limit: 7000MS Memory Limit: 65536K Total Submissions: 22147 Accepted: 7897 Description In this problem, you have to analyze a particular sorting algorith...2011-08-08 16:10:49 · 90 阅读 · 0 评论 -
hdu 1556 Color the ball
Color the ball Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2340 Accepted Submission(s): 1372 Problem Description N个气球排成一排,从左到右依次编号为1,2...2011-08-08 15:37:34 · 60 阅读 · 0 评论 -
hdu 1541 Stars(最基础的树状数组)
Stars Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1287 Accepted Submission(s): 503 Problem Description Astronomers often examine star ...2011-08-08 15:25:31 · 80 阅读 · 0 评论 -
hdu 2227 Find the nondecreasing subsequences(DP+树状数组+离散化)
Find the nondecreasing subsequences Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 503 Accepted Submission(s): 192 Problem Description H...2011-11-13 00:17:07 · 132 阅读 · 0 评论