
数据结构之线段树
文章平均质量分 85
曉_寧
这个作者很懒,什么都没留下…
展开
-
hdu 1754 I Hate It 单点更新 区域求和
Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和原创 2014-08-13 21:16:18 · 619 阅读 · 0 评论 -
hdu 1166 敌兵布阵 线段树和树状数组
DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。 中央情报原创 2014-08-13 21:15:17 · 665 阅读 · 0 评论 -
poj 3277 City Horizon 线段树加上离散化
DescriptionFarmer John has taken his cows on a trip to the city! As the sun sets, the cows gaze at the city horizon and observe the beautiful silhouettes formed by the rectangular buildings.The原创 2014-08-14 17:28:51 · 729 阅读 · 0 评论 -
hdu 1698 Just a Hook 线段树区域更新
DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the same lengt原创 2014-08-13 21:19:32 · 683 阅读 · 0 评论 -
hdu 1255 覆盖的面积 线段树求重复覆盖的面积
Problem Description给定平面上若干矩形,求出被这些矩形覆盖过至少两次的区域的面积. Input输入数据的第一行是一个正整数T(1注意:本题的输入数据较多,推荐使用scanf读入数据. Output对于每组测试数据,请计算出被这些矩形覆盖过至少两次的区域的面积.结果保留两位小数.原创 2014-08-14 23:11:19 · 798 阅读 · 0 评论 -
poj 2299 Ultra-QuickSort 归并排序 线段树
DescriptionIn 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 seq原创 2014-07-30 00:46:34 · 796 阅读 · 0 评论 -
hdu 2852 KiKi's K-Number 线段树
Problem DescriptionFor the k-th number, we all should be very familiar with it. Of course,to kiki it is also simple. Now Kiki meets a very similar problem, kiki wants to design a container, the cont原创 2014-08-14 10:24:00 · 583 阅读 · 0 评论