Cruiying
Cruiying
全部文章
单调栈
2-sat(1)
BSGS(2)
dfs(2)
dp(63)
dp + 线段树(1)
floyd(3)
Hash(1)
KM算法(1)
Kruskal重构树(2)
LCA(6)
manachar(2)
Mendix(4)
tarjan(1)
中位数(1)
主席树(2)
二分(3)
分数规划(3)
前缀和优化dp(2)
单调队列(1)
单调队列优化dp(1)
博弈(2)
后缀数组(15)
字典树(1)
差分约束系统(1)
并查集(4)
异或(2)
思维(2)
思维题(4)
扩展欧几里得算法(1)
拉格朗日插值(2)
数论(8)
未归档(15)
构造(1)
枚举(1)
模拟(3)
模板(1)
水题(4)
矩阵加速(2)
线段树(3)
网络流(2)
莫比乌斯反演(2)
莫队(4)
蓝桥杯(1)
规律(2)
贪心(2)
输入输出(1)
题解(1)
归档
标签
去牛客网
登录
/
注册
Cruiying的博客
全部文章
/ 单调栈
(共6篇)
1215 数组的宽度 单调栈
N个整数组成的数组,定义子数组a[i]…a[j]的宽度为:max(a[i]…a[j]) - min(a[i]…a[j]),求所有子数组的宽度和。 输入 第1行:1个数N,表示数组的长度。(1 <= N <= 50000) 第2 - N + 1行:每行1个数,表示数组中的元素(1 <...
2019-04-29
0
500
CF547B Mike and Feet
Mike is the president of country What-The-Fatherland. There are n n bears living in this country besides Mike. All of them are standing in a line and ...
2019-04-22
0
488
CF547B Mike and Feet
Mike is the president of country What-The-Fatherland. There are n n bears living in this country besides Mike. All of them are standing in a line and ...
2019-04-22
0
392
The Preliminary Contest for ICPC China Nanchang National Invitational I题 Max answer
Alice has a magic array. She suggests that the value of a interval is equal to the sum of the values in the interval, multiplied by the smallest value...
2019-04-21
0
443
The Preliminary Contest for ICPC China Nanchang National Invitational I题 Max answer
Alice has a magic array. She suggests that the value of a interval is equal to the sum of the values in the interval, multiplied by the smallest value...
2019-04-21
0
417
牛客小白月赛13 H题
链接:https://ac.nowcoder.com/acm/contest/549/H 来源:牛客网 柱状图是有一些宽度相等的矩形下端对齐以后横向排列的图形,但是小A的柱状图却不是一个规范的柱状图,它的每个矩形下端的宽度可以是不相同的一些整数,分别为a[i]每个矩形的高度是h[i],现在小A只想...
2019-04-17
0
406