![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
单调栈
ssl_ljh
欢迎回家,珂朵莉.
展开
-
[单调栈]Imbalanced Array
ImbalancedArrayImbalanced ArrayImbalancedArray题目描述You are given an array a a a consisting of n n n elements. The imbalance value of some subsegment of this array is the difference between the maximum and minimum element from this segment. The imbalance原创 2020-08-13 09:24:00 · 597 阅读 · 0 评论 -
[单调栈]排队
排队排队排队题目描述n个人排成一条直线(一排),给出队伍中每个人的身高,每个人只能看到站在他右边且个头比他小没有被其他人挡住(跟他身高相同也会挡出他)的人。请求出所有人可以看到的人数之和。1<=N<=80,000样例输入6510374122样例输出5数据范围50% 1≤N≤10000100% 1≤N≤1000001<=p<=q<=ncode#include<stdio.h>#include<iostream&原创 2020-08-13 09:18:20 · 556 阅读 · 0 评论