Die datenstruktur ist erataunlich! #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #define R(a,b,c) for(register int a ...
目录 $code$ 题目 largest rectangle in a histogram 思路 单调栈。 不知道怎么描述所以用样例讲一下。 7 2 1 4 5 1 3 3 最大矩形的高度一定是给你的高度中的一个。 我们枚举最大高度。 很明显以某一高度为...