
线段树
文章平均质量分 77
wybooooooooo
博客已正式搬迁至博客园 https://home.cnblogs.com/u/wyboooo/ 欢迎大家访问
展开
-
hdu5692【dfs序】【线段树】
SnacksTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 4446 Accepted Submission(s): 980Problem Description百度科技园内有n个零食机,零食机之间通过n−1条路相互连通。每个零食机...原创 2018-05-03 21:24:45 · 223 阅读 · 0 评论 -
徐州网络赛H-Ryuji doesn't want to study【线段树】
Ryuji is not a good student, and he doesn't want to study. But there are n books he should learn, each book has its knowledge a[i]a[i]. Unfortunately, the longer he learns, the fewer he gets. That m...原创 2018-09-11 11:59:35 · 226 阅读 · 0 评论 -
南京网络赛G-Lpl and Energy【线段树】
During tea-drinking, princess, amongst other things, asked why has such a good-natured and cute Dragon imprisoned Lpl in the Castle? Dragon smiled enigmatically and answered that it is a big secret. A...原创 2018-09-04 20:54:05 · 133 阅读 · 0 评论 -
hdu4027Can you answer these queries?【线段树】
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...原创 2018-08-08 20:40:39 · 230 阅读 · 0 评论 -
poj3264 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 ...原创 2018-08-08 17:53:03 · 125 阅读 · 0 评论 -
poj2528 Mayor's posters【线段树】
The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim. The city council has fin...原创 2017-09-13 19:49:26 · 186 阅读 · 0 评论 -
poj3468 A simple problem with integers
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 ...原创 2018-08-08 14:28:15 · 114 阅读 · 0 评论 -
hdu1754 I Hate It【线段树】
很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input 本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和 M ( 0<N<=200000,0<M<5...原创 2018-08-08 14:12:15 · 153 阅读 · 0 评论 -
hdu1166 敌兵布阵【线段树】
C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。 中央情报局要研究敌人究竟演习什么战术,所...原创 2018-08-08 13:59:27 · 203 阅读 · 0 评论 -
hdu4614 Vases and Flowers【线段树】【二分】
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. Sh...原创 2018-08-11 20:18:47 · 179 阅读 · 0 评论 -
hdu4578 Transformation【线段树】
Yuanfang is puzzled with the question below: There are n integers, a 1, a 2, …, a n. The initial values of them are 0. There are four kinds of operations. Operation 1: Add c to each number between a...原创 2018-08-09 20:28:47 · 408 阅读 · 0 评论 -
hdu3974 Assign the task【线段树】
There is a company that has N employees(numbered from 1 to N),every employee in the company has a immediate boss (except for the leader of whole company).If you are the immediate boss of someone,that ...原创 2018-08-09 14:27:26 · 169 阅读 · 0 评论 -
hdu1540 Tunnel Warfare【线段树】
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 t...原创 2018-08-09 11:19:04 · 353 阅读 · 0 评论 -
徐州网络赛G-Trace【线段树】
There's a beach in the first quadrant. And from time to time, there are sea waves. A wave ( xx , yy ) means the wave is a rectangle whose vertexes are ( 00 , 00 ), ( xx , 00 ), ( 00 , yy ), ( xx , yy ...原创 2018-09-11 19:46:20 · 244 阅读 · 0 评论