![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线段树
文章平均质量分 69
czdb
这个作者很懒,什么都没留下…
展开
-
csu:1914: John and his party
Description John is very popular ,he often holds parties with his friends.Today is a sunny day,it seems hold a bonefire party is a good idea.So John open his phone book and invites his friends in ord原创 2017-05-09 14:17:18 · 322 阅读 · 0 评论 -
51nod:加农炮(线段树+单调性)
一个长度为M的正整数数组A,表示从左向右的地形高度。测试一种加农炮,炮弹平行于地面从左向右飞行,高度为H,如果某处地形的高度大于等于炮弹飞行的高度H(A[i] >= H),炮弹会被挡住并落在i - 1处,则A[i - 1] + 1。如果H 所有的A[i],这个炮弹也无效。现在给定N个整数的数组B代表炮弹高度,计算出最后地形的样子。 例如:地形高度A = {1, 2, 0, 4, 3, 2, 1原创 2017-06-13 15:45:31 · 540 阅读 · 2 评论 -
Remove Extra One Codeforces Round #450 (Div. 2)(线段树)
C. Remove Extra One time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given a permutation p of length n. Remov原创 2017-12-12 18:35:25 · 160 阅读 · 0 评论 -
小H的询问(线段树)
链接:https://www.nowcoder.com/acm/contest/72/D 来源:牛客网 题目描述 小H给你一个数组{a},要求支持以下两种操作: 0 l r(1<=l<=r<=n),询问区间[l,r]中权值和最大的有效子区间的权值和,一个子区间被认为是有效的当且仅当这个子区间中没有两个相邻的偶数或者奇数。 1 x v(1<=x<=n,-109...原创 2018-03-04 14:38:38 · 1519 阅读 · 0 评论