
线段树
文章平均质量分 83
Hallelujah520
这个作者很懒,什么都没留下…
展开
-
hdu 5861 (线段树,区间更新,单点查询)
There are n villages along a high way, and divided the high way into n-1 segments. Each segment would charge a certain amount of money for being open for one day, and you can open or close an arbitrary原创 2017-09-13 14:56:49 · 378 阅读 · 0 评论 -
HDU 5828 Rikka with Sequence 线段树优化
转: http://blog.youkuaiyun.com/xzxxzx401/article/details/52196950 题意很明确是线段树,需要三种操作:区间更新(加值),区间开根号,区间求和。区间开根号就是区间内部每一个值开根号。思路先膜吧:我和这个大佬的代码风格很像,所以看的很舒服,大佬思路也很详细清晰,适合我这种咸鱼看。膜膜膜。区间更新和求和直接套线段树板子,问题就在于区间开跟。开跟没有什么转载 2017-09-08 14:52:10 · 317 阅读 · 0 评论 -
hdu 6155(线段树+dp+矩阵)
Given a binary string S[1,…,N]S[1,…,N] (i.e. a sequence of 0’s and 1’s), and QQ queries on the string. There are two types of queries: Flipping the bits (i.e., changing all 1 to 0 and 0 to 1) between原创 2017-09-05 00:16:46 · 451 阅读 · 0 评论 -
hdu 6183 Color it(动态线段树,cdq分治)
Do you like painting? Little D doesn’t like painting, especially messy color paintings. Now Little B is painting. To prevent him from drawing messy painting, Little D asks you to write a program to mai原创 2017-09-01 00:33:50 · 558 阅读 · 0 评论 -
hdu 6070 二分+线段树维护
In ACM/ICPC contest, the ”Dirt Ratio” of a team is calculated in the following way. First let’s ignore all the problems the team didn’t pass, assume the team passed XX problems during the contest, and原创 2017-08-05 10:36:55 · 445 阅读 · 0 评论 -
codeforces The Bakery(n个数划分k区间,权值为区间不同数,问总权值最大)
B. The Bakery time limit per test2.5 seconds memory limit per test256 megabytes inputstandard input outputstandard outputSome time ago Slastyona the Sweetmaid decided to open her own bakery! She bo原创 2017-07-31 17:49:40 · 629 阅读 · 0 评论