
线段树
文章平均质量分 85
剑不飞
时刻思考,找准方向,坚定执行,永不服输(AC才是王道。)
展开
-
codeforce 356 A. Knight Tournament(线段树覆盖,3级)
A. Knight Tournamenttime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputHooray! Berl II, the king of Berland i原创 2013-10-16 13:30:40 · 1209 阅读 · 0 评论 -
hdu 4638 Group(线段树,离线维护左边界,4级)
GroupTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 369 Accepted Submission(s): 207Problem DescriptionThere are n men ,every man原创 2013-08-02 15:36:45 · 642 阅读 · 0 评论 -
uva 1428 - Ping pong(树状数组,4级)
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原创 2013-07-06 20:44:15 · 1331 阅读 · 0 评论 -
hdu 4339 Query(线段树+二分,4级)
QueryTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1956 Accepted Submission(s): 670Problem DescriptionYou are given two s原创 2013-06-22 18:58:45 · 640 阅读 · 0 评论 -
hdu 4302 Holedox Eating(线段树或MAP,SET,4级)
Holedox EatingTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2341 Accepted Submission(s): 792Problem DescriptionHoledox is a sma原创 2013-05-23 19:09:10 · 616 阅读 · 0 评论 -
NEFU 708 Longest Non-decreasing Substring(线段树+DP)
Longest Non-decreasing SubstringTime Limit 1000msMemory Limit 65536KdescriptionYou are given a string S no longer than 100,000 consisting of c原创 2013-05-11 16:50:31 · 773 阅读 · 0 评论 -
nefu700 Car race game(离散化+线段树)
Car race gameTime Limit 1000msMemory Limit 65536Kdescription Bob is a game programming specialist. In his new car race game, there are some r原创 2013-05-05 14:19:55 · 1084 阅读 · 0 评论 -
线段树的分析理解(不定期更新)
基础知识点;所谓线段树,也就是一颗树,不过这棵树数管的是一个线段,而原本的树管的只是不同的点,其实本质上是一个道理。线段树算法主要由三部分组成,1建树,2更新3查询。就以其中第一题为例子#define lson t#define rson t#define midl (l+r)/2#define midr (l+r)/2+1using namespace std;原创 2013-04-01 12:23:14 · 678 阅读 · 0 评论 -
hdu 1556 Color the ball(线段树+懒惰标记)
Color the ballTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4961 Accepted Submission(s): 2624Problem DescriptionN个气球排成一排,从左原创 2013-03-31 16:01:57 · 734 阅读 · 0 评论 -
poj 2299 Ultra-QuickSort(求逆序数,树状数组)
Ultra-QuickSortTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 27736 Accepted: 9946DescriptionIn this problem, you have to analyze a particular sorting al原创 2012-08-11 20:31:06 · 576 阅读 · 0 评论 -
nefu 三国之战
三国之战 Time Limit 1000 Memory Limit 65536 description 在三国某某战争中,魏军要围攻蜀国. ,诸葛亮亲自指挥战争,对抗曹操。现假设诸葛亮有N个大炮,每个大炮都有一个攻击值ai(ai>=0 &&ai=0 && x input 第一行输入N(N 接着输入Q,代表Q次操作,格式: attack l原创 2012-08-08 15:12:34 · 415 阅读 · 0 评论 -
poj 3468 A Simple Problem with Integers(线段树)
H - A Simple Problem with IntegersCrawling in process...Crawling failedTime Limit:5000MS Memory Limit:131072KB 64bit IO Format:%I64d & %I64uSubmitStatusDescriptionYou have N i原创 2012-08-07 19:30:22 · 448 阅读 · 0 评论 -
hdu 2795 Billboard(线段树)
BillboardTime Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4292 Accepted Submission(s): 2003Problem DescriptionAt the entrance to the un原创 2012-08-07 17:13:16 · 455 阅读 · 0 评论 -
hdu 4325 Flowers(线段树+哈希散列)
FlowersTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1076 Accepted Submission(s): 535Problem DescriptionAs is known to all, the原创 2012-08-06 17:21:19 · 550 阅读 · 0 评论 -
hdu 3016 Man Down(线段树)
Man DownTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1171 Accepted Submission(s): 400Problem DescriptionThe Game “Man Down 100原创 2012-08-06 14:23:47 · 499 阅读 · 0 评论 -
hdu 1166 敌兵布阵(线段树)
敌兵布阵Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 17672 Accepted Submission(s): 7704Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间原创 2012-08-05 18:54:48 · 563 阅读 · 0 评论