线段树
浮生一朝
这个作者很懒,什么都没留下…
展开
-
I Hate It HDU - 1754(线段树点更新)
很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input 本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和 M ( 0#include<stdio.h>#inclu原创 2017-09-25 19:49:48 · 229 阅读 · 0 评论 -
敌兵布阵 HDU - 1166(线段树点更新)
C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。中央情报局要研究敌人究竟演习什么战术,所以T原创 2017-09-25 20:04:22 · 1221 阅读 · 0 评论 -
A Simple Problem with Integers POJ - 3468(线段树区间更新,查找)
You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to ask for the s原创 2017-09-25 20:11:47 · 224 阅读 · 0 评论 -
Just a Hook HDU - 1698(线段树区间更新)
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.Now Pudge wan原创 2017-09-26 21:54:02 · 305 阅读 · 0 评论 -
Balanced Lineup POJ - 3264(线段树寻找区间最大值最小值)
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 s原创 2017-09-28 21:17:21 · 283 阅读 · 0 评论 -
Tunnel Warfare HDU - 1540
During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, villages connected by tunnels lay in a line. Except th原创 2017-09-29 22:15:09 · 210 阅读 · 0 评论 -
Vases and Flowers HDU - 4614(线段树区间更新)
Alice is so popular that she can receive many flowers everyday. She has N vases numbered from 0 to N-1. When she receive some flowers, she will try to put them in the vases, one flower in one vase. She原创 2017-10-08 21:50:34 · 581 阅读 · 0 评论