E - Largest Rectangle in a Histogram Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1506 Appoint description: Description A histogram is a polygon composed of a sequence of rectangles aligned a…
题目链接:HDU - 1506 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 shows the histogram that consists of rec…
Largest Rectangle in a Histogram Problem Description: 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 sh…
题目传送门//res tp hdu 单调栈的经典问题 维护区间的左右边界计算面积即可 #include<iostream> #include<algorithm> #include<stack> using namespace std; typedef long long ll; const int L = 100010; ll H[L]; int n; ll Maxrectangle(){ ll ans = 0; stack<int>M; for(int…
题目网址:http://acm.hdu.edu.cn/showproblem.php?pid=1506 题目: Largest Rectangle in a Histogram Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 18833 Accepted Submission(s): 5636 Problem Description…