![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线段树
文章平均质量分 61
zuhiul
这个作者很懒,什么都没留下…
展开
-
codeforces 1567 E. Non-Decreasing Dilemma
本场比赛其他题目的题解A. Domino DisasterB. MEXor MixupC. Carrying ConundrumD. Expression Evaluation ErrorE. Non-Decreasing DilemmaE. Non-Decreasing Dilemma开启传送门题目描述Alice has recently received an array a1,a2,…,ana_1, a_2, \dots, a_na1,a2,…,an for her birt原创 2021-09-13 18:57:32 · 301 阅读 · 0 评论 -
hdu 1166 敌兵布阵
C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。中央情报局要研究敌人究竟演习什么战术,所以T原创 2017-07-24 21:23:45 · 139 阅读 · 0 评论 -
hdu 1754 I Hate It
题目链接:点这里【分析】 很明显的线段树,而且是点更新区间查询,维护区间最大值,没什么好说的,算是入门题了。【代码】#include<iostream>#include<cstdio>#include<cstring>#include<string.h>#include<algorithm>#include<vector>#include<cmath>#include<stdlib.原创 2017-08-07 17:02:42 · 126 阅读 · 0 评论 -
hdu 1698 Just a Hook
题目链接:点这里【题意】这个人有一根长长的。。。这个长长的。。。可以看作是很多短短的。。。组成的。每一段都有自己固定的价值(长度乘以单价)。其中初始价值为1,问你经过修改后价值是多少?其中单价只能是1~3.【分析】红果果的线段树裸题啊。区间更新求和。套模板就行。【代码】#include<iostream>#include<cstdio>#include<cstring>#include<str原创 2017-08-07 22:15:41 · 128 阅读 · 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原创 2017-08-08 14:02:30 · 143 阅读 · 0 评论 -
hdu 4027 Can 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原创 2017-08-08 16:04:33 · 257 阅读 · 0 评论 -
codeforces 948B Primal Sport
开启传送门。Alice and Bob begin their day with a quick game. They first choose a starting number X0 ≥ 3 and try to reach one million by the process described below.Alice goes first and then they take al...原创 2018-04-28 16:25:02 · 201 阅读 · 0 评论