题意:给出n个宽度为1 高度为hi的长方形 问能圈出的最大长方形面积多大思路:http://blog.csdn.net/dgq8211/article/details/7740610#include#include#include#include#includeusing namespace ...
分类:
其他好文 时间:
2015-04-06 16:59:57
阅读次数:
118
N - Sumsets
Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d
& %I64u
Submit Status Practice POJ
2549
Description
Given S, a set of integers, find the largest d ...
分类:
其他好文 时间:
2015-04-06 08:56:29
阅读次数:
125
目录目录
题目
思路
AC代码题目
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.
Not...
分类:
其他好文 时间:
2015-04-05 13:22:34
阅读次数:
140
题目链接:largest-number
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
/**
*
Given a list of non negative integers, arrange them such that they form the largest n...
分类:
其他好文 时间:
2015-04-04 12:19:51
阅读次数:
146
题目链接:Largest Rectangle in Histogram
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.
...
分类:
其他好文 时间:
2015-04-03 17:18:59
阅读次数:
128
Largest Rectangle in a Histogram
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 12947 Accepted Submission(s): 3653
Problem Des...
分类:
其他好文 时间:
2015-04-03 15:28:51
阅读次数:
158
1 题目:Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[?2,1,?3,4,?1...
分类:
其他好文 时间:
2015-04-02 22:06:17
阅读次数:
166
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.
两两比较 可以利用sort函数来排序,自定义comp...
分类:
其他好文 时间:
2015-04-01 19:59:41
阅读次数:
120
Maximal Rectangle
Given
a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.
解题思路;
题意表示找到右全1形成的最大的矩形块。
解法1:
用动态规划做,若d[i][j]表示以matrix[...
分类:
其他好文 时间:
2015-03-31 22:15:43
阅读次数:
159
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1506刚开始没考虑时间复杂度,直接敲了,直接tle了,之后没有思路,然后看题解,看见大神写的优化非常棒。大神的解释:(其实对于w[i]来说,如果去求后面连续的值,完全没必要一个个去比对,直接看w[i-1]的值...
分类:
其他好文 时间:
2015-03-31 19:39:33
阅读次数:
143