线段树
文章平均质量分 82
liluoyu_1016
这个作者很懒,什么都没留下…
展开
-
hdu 1754 I Hate It 线段树
很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input 本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和 M ( 0学生ID编号分别从1编到N。 第二原创 2017-07-22 10:06:36 · 173 阅读 · 0 评论 -
hdu 1166 敌兵布阵 线段树
C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。中央情报局要研究敌人究竟演习什么战术原创 2017-07-22 08:39:42 · 232 阅读 · 0 评论 -
poj 3468 A Simple Problem with Integers 线段树 成段更新
A Simple Problem with IntegersTime Limit: 5000MS Memory Limit: 131072KTotal Submissions: 112353 Accepted: 34930Case Time Limit: 2000MSDescriptionYou have N原创 2017-07-22 16:14:33 · 204 阅读 · 0 评论 -
HDU - 1698 Just a Hook 线段树 成段更新
In 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 length.原创 2017-07-24 19:55:15 · 223 阅读 · 0 评论 -
poj 3264 Balanced Lineup 线段树
For the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with some of the cows. To keep things原创 2017-07-26 10:18:31 · 165 阅读 · 0 评论 -
Can you answer these queries? HDU - 4027 线段树 开方和
A lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to eliminate the battleships. Each of the battleships can be marked a value of end原创 2017-11-11 13:53:18 · 209 阅读 · 0 评论 -
Color the ball HDU - 1556 线段树区间更新点查询
N个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a <= b),lele便为骑上他的“小飞鸽"牌电动车从气球a开始到气球b依次给每个气球涂一次颜色。但是N次以后lele已经忘记了第I个气球已经涂过几次颜色了,你能帮他算出每个气球被涂过几次颜色吗?Input 每个测试实例第一行为一个整数N,(N 当N = 0,输入结束。 Output 每个测试实例输原创 2018-01-24 10:52:26 · 164 阅读 · 0 评论 -
K-th Number POJ - 2104 线段树 归并树
You are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data structure that would be able to return quic原创 2018-04-10 20:29:14 · 403 阅读 · 0 评论