Largest Rectangle in a Histogram http://poj.org/problem?id=2559 http://acm.hdu.edu.cn/showproblem.php?pid=1506 http://lightoj.com/volume_showproblem.php?problem=1083 Time Limi
http://acm.hdu.edu.cn/showproblem.php?pid=1506 题意:给出一个由 n n n条矩形组成的图形,每个矩形宽度均为 1 1 1,高度为 h i h_i hi,求该图形中最大的连续矩形面积。 笛卡尔树的典型题,在此学习一下笛卡尔树,参考博客: https://www.cnblogs.com/CaptainSlow/p/9282507.html http
问题描述: A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have different heights. For example, the figure on the left