题意:坐标轴上有连续的n个底均为1,高为h[i]的矩形,求能够构成的最大矩形的面积。学习的别人的代码 @_@看底的坐标怎么找的看了好一会儿---记l[i]为矩形的底的左边的坐标,就将它一直向左扩展记r[i]为矩形的底的右边的坐标(倒着找,从n开始找,题解里面还着重强调了要倒着找,要不然就体现不出优化...
分类:
其他好文 时间:
2015-02-10 10:26:27
阅读次数:
137
Givennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histog...
分类:
其他好文 时间:
2015-02-09 15:47:14
阅读次数:
174
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.class Solution {public:int larges...
分类:
其他好文 时间:
2015-02-09 15:29:48
阅读次数:
125
1 题目Given a list of non negative integers, arrange them such that they form the largest number.For example, given[3, 30, 34, 5, 9], the largest formed...
分类:
其他好文 时间:
2015-02-09 00:43:28
阅读次数:
173
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],the...
分类:
其他好文 时间:
2015-02-09 00:42:25
阅读次数:
216
Given a list of non negative integers, arrange them such that they form the largest number.For example, given[3, 30, 34, 5, 9], the largest formed num...
分类:
其他好文 时间:
2015-02-09 00:37:33
阅读次数:
218
Problem Description
There is a large room in the Pyramid called Room-of-No-Return. Its floor is covered by rectangular tiles of equal size. The name of the room was chosen because of the very high ...
分类:
其他好文 时间:
2015-02-06 09:36:59
阅读次数:
185
题目:
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.
Above is a histogram where ...
分类:
编程语言 时间:
2015-02-05 09:41:47
阅读次数:
206
Given a list of non negative integers, arrange them such that they form the largest number.
For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330.
Note: The result may be ve...
分类:
其他好文 时间:
2015-02-04 23:30:48
阅读次数:
420
uva 10012 How Big Is It?
Ian's going to California, and he has to pack his things, including his collection of circles. Given a set of circles, your program must find the smallest rectangular box...
分类:
其他好文 时间:
2015-02-03 23:11:02
阅读次数:
359