
线段树&树状数组
-
原创
hdu 2795 Billboard(线段树 求最值的位置)
Billboard Time Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3119 Accepted Submission(s): 1506 Problem Description At the entrance2012-04-24 19:33:28 阅读数 519 评论数 0 -
原创
poj 1177 & hdu 1828 Picture(线段树+离散化)
Picture Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1095 Accepted Submission(s): 608 Problem Description A number of rectang2011-04-09 16:18:00 阅读数 630 评论数 0 -
原创
poj 2482 Stars in Your Window(扫描线+区间最值)
Stars in Your Window Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7013 Accepted: 1871 Description Fleeting time does not blur my memory of you. Can it2012-05-13 23:25:51 阅读数 933 评论数 0 -
原创
hdu 3265 Posters(矩形面积并 扫描线+线段树)
Posters Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2312 Accepted Submission(s): 515 Problem Description Ted has a new house2012-05-14 13:00:03 阅读数 861 评论数 0 -
原创
hdu 1255 覆盖的面积(矩形面积并,多次覆盖)
覆盖的面积 Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1949 Accepted Submission(s): 960 Problem Description 给定平面上若干矩形,求出被这些矩形覆盖过2012-05-14 14:07:50 阅读数 941 评论数 0 -
原创
poj 2464 Brownie Points II(两棵线段树——线段树区间和)
Brownie Points II Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 1354 Accepted: 478 Description Stan and Ollie play the game of Odd Brownie Points. Some2012-05-16 11:51:44 阅读数 783 评论数 0 -
原创
hdu 3642 Get The Treasury(线段树求体积并)
Get The Treasury Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 892 Accepted Submission(s): 293 Problem Description Jack knows2012-05-18 11:05:31 阅读数 848 评论数 0 -
原创
hdu 3255 Farming(矩形面积并 多种矩形)
Farming Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 588 Accepted Submission(s): 151 Problem Description You have a big farm2012-05-18 12:10:40 阅读数 856 评论数 0 -
原创
hdu 4331 Image Recognition(DP+线段树)2012 Multi-University Training Contest 4
Image Recognition Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 377 Accepted Submission(s): 137 Problem Description Now there2012-08-04 11:38:03 阅读数 863 评论数 0 -
原创
hdu 4348 To the moon(线段树成段更新) 2012 Multi-University Training Contest 5
To the moon Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 38 Accepted Submission(s): 6 Problem Description Background To The2012-08-07 18:55:55 阅读数 1644 评论数 12 -
原创
poj 3667 Hotel(线段树区间合并&Splay解法)
Hotel Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 6224 Accepted: 2546 Description The cows are journeying north to Thunder Bay in Canada to gain cult2012-04-30 11:18:11 阅读数 1112 评论数 0 -
原创
hdu 2871 Memory Control(线段树的各种操作&Splay解法)
Memory Control Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2043 Accepted Submission(s): 480 Problem Description Memory units2012-05-01 15:01:30 阅读数 760 评论数 0 -
原创
ZOJ 2900 Icecream(线段树)
题意:给你一个长度为n的串,从中选出字串,使得长度至少为k,且相邻的数值差的绝对值小于等于p,求这样的字串的个数mod m的值 地址:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2900 分析:我们可以马上想到,以前i个数,长度为j的字串个数为f[ i ][ j ],那么有f[ [i ][ j ]=sum{ f[ i2013-03-18 17:51:41 阅读数 1104 评论数 0 -
原创
zoj 3540 Adding New Machine(map+离散化)
地址:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4495 题意:给你w*h个格子,并且一些矩形块占用着一些格子,问剩下的空间,能装下1*m的矩形的方案数 分析:我们可以枚举一个下标,然后维护另一个下标构成的线段,由于题目的特殊性,线段不会重叠,所以变得简单了许多,对于每次添加一条线段l~r,它的左边第一条线段的右边界是2013-06-15 16:01:05 阅读数 2069 评论数 0 -
原创
ZOJ 3018 Population(二维线段树?矩形树?)
地址:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3018 题意:在平面内最多又32768个点,现在有两种操作,1:在一些点上加上一个数n,2:询问一个矩形区域内的点的数的和 分析:这题一看像线段树,想离线搞,发现不好处理,也许可以,不过我是做不来了,后来自己YY了下二维的线段树,从来没写过= =,一开始发现空间会爆2013-07-14 09:18:30 阅读数 2501 评论数 1 -
原创
poj 1151 Atlantis(线段树 扫描线)
Atlantis Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 8759 Accepted: 3457 Description There are several ancient Greek texts that contain descriptions of t2011-04-11 18:22:00 阅读数 794 评论数 0 -
原创
hdu 1540 Tunnel Warfare(线段树 连续区间)
Tunnel Warfare Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2069 Accepted Submission(s): 766 Problem Description During the W2012-05-01 15:34:17 阅读数 809 评论数 0 -
原创
CF 46 D. Parking Lot(线段树)
D. Parking Lot time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Nowadays it is becoming increasingly difficu2012-05-01 17:37:24 阅读数 1056 评论数 0 -
原创
poj 2828 Buy Tickets(线段树 区间和的应用)
Buy Tickets Time Limit: 4000MS Memory Limit: 65536K Total Submissions: 6858 Accepted: 3298 Description Railway tickets were difficult to buy around the Lunar New Ye2012-04-24 22:23:11 阅读数 778 评论数 0 -
原创
hdu 1166 敌兵布阵(线段树——单点更新)
敌兵布阵 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 13585 Accepted Submission(s): 5903 Problem Description C国的死对头A国这段时间正在进行军事演习2012-04-24 17:22:00 阅读数 696 评论数 0 -
原创
hdu 1754 I Hate It(splay入门题)
I Hate It Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 11703 Accepted Submission(s): 4478 Problem Description 很多学校流行一种比较的习惯。老2011-11-15 15:12:44 阅读数 1230 评论数 4 -
原创
hdu 1394 Minimum Inversion Number(线段树求逆序对)
Minimum Inversion Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3336 Accepted Submission(s): 2026 Problem Description T2012-04-24 18:39:36 阅读数 594 评论数 0 -
原创
hdu 1698 Just a Hook(线段树成)
Just a Hook Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7560 Accepted Submission(s): 3653 Problem Description In the game of2012-04-25 14:33:28 阅读数 504 评论数 0 -
原创
poj 2886 Who Gets the Most Candies?(反质数+线段树模拟约瑟夫)
Who Gets the Most Candies? Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 5528 Accepted: 1579 Case Time Limit: 2000MS Description N children are s2012-04-25 13:27:24 阅读数 860 评论数 0 -
原创
poj 3468 A Simple Problem with Integers(线段树成段更新)
A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 29597 Accepted: 8312 Case Time Limit: 2000MS Description You have N2012-04-25 15:15:08 阅读数 452 评论数 0 -
原创
poj 2528 Mayor's posters(扫描线+堆维护||离散化+线段树)
Mayor's posters Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 25116 Accepted: 7263 Description The citizens of Bytetown, AB, could not stand that the c2012-04-25 18:30:19 阅读数 622 评论数 0 -
原创
poj 3225 Help with Intervals(线段树 区间的并 交 减 替换 等)
Help with Intervals Time Limit: 6000MS Memory Limit: 131072K Total Submissions: 5802 Accepted: 1285 Case Time Limit: 2000MS Description LogLoader, Inc. is a2012-04-26 12:33:01 阅读数 722 评论数 0 -
原创
poj 1436 Horizontally Visible Segments(线段树 区间的覆盖关系)
Horizontally Visible Segments Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 1942 Accepted: 736 Description There is a number of disjoint vertical line2012-04-26 17:14:06 阅读数 852 评论数 0 -
原创
uestc 1425 Another LCIS(线段树 最长递增序列)
Another LCIS Time Limit: 1000 ms Memory Limit: 65536 kB Solved: 100 Tried: 1593 Description For a sequence S1,S2,...,SN, and a pair of integers (i, j), if 1 i i+1 i+2 j-1 j, then th2012-04-28 14:22:01 阅读数 1019 评论数 4 -
原创
poj 2991 Crane(向量旋转+线段树成段更新)
Crane Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 1609 Accepted: 416 Special Judge Description ACM has bought a new crane (crane -- jeřáb) . The2012-04-27 15:15:47 阅读数 825 评论数 0 -
原创
uestc 1546 Bracket Sequence(线段树 括号匹配)
Bracket Sequence Time Limit: 3000 ms Memory Limit: 65536 kB Solved: 28 Tried: 380 Description There is a sequence of brackets, which supports two kinds of operations. 1. we can cho2012-04-29 20:35:14 阅读数 1043 评论数 0 -
原创
hdu 3308 LCIS(线段树 最长连续递增)
LCIS Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1478 Accepted Submission(s): 665 Problem Description Given n integers. You2012-04-30 18:15:31 阅读数 803 评论数 3 -
原创
hdu 3397 Sequence operation(线段树的各种操作)
Sequence operation Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2790 Accepted Submission(s): 806 Problem Description lxhgww2012-04-30 19:23:14 阅读数 933 评论数 3