题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1506
题意:给定一个条形统计图,找出一个矩形可以覆盖的最大面积
开两个数组r[](right),l[](left),
分别记录左边和右边能构成矩形的最远的边
#include
#define maxint 200000
__int64 a[maxint];
__int64 l[maxint];
__int64 r[maxint];
int main(){
}
本题加强版:http://acm.hdu.edu.cn/showproblem.php?pid=1505
题解:http://blog.sina.com.cn/s/blog_9635e5ef0101bavh.html