白书上的例题做一遍tarjan后,缩点,每一个scc节点的权为它的结点数,做一次DAG上的动规,求出路径上的最大点权和,就可以了 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using name...
分类:
其他好文 时间:
2015-08-03 20:41:16
阅读次数:
144
Largest Rectangle in a Histogram
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 14050 Accepted Submission(s): 4008
Problem Description
A...
分类:
其他好文 时间:
2015-08-03 19:22:44
阅读次数:
136
Maximal Square
Total Accepted: 8699
Total Submissions: 44034
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.
For example,...
分类:
其他好文 时间:
2015-08-03 17:00:01
阅读次数:
115
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-08-03 00:55:11
阅读次数:
133
Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.
For example,
Given [3,2,1,5,6,4] and k = 2, return 5....
分类:
其他好文 时间:
2015-08-02 23:25:40
阅读次数:
111
https://leetcode.com/problems/maximum-subarray/Find the contiguous subarray within an array (containing at least one number) which has the largest sum...
分类:
其他好文 时间:
2015-08-02 11:43:32
阅读次数:
95
问题描述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 ...
分类:
其他好文 时间:
2015-08-02 11:38:09
阅读次数:
96
Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the a...
分类:
其他好文 时间:
2015-07-30 18:36:07
阅读次数:
107
【053-Maximum Subarray(最大子数组和)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
For example, given the ar...
分类:
编程语言 时间:
2015-07-29 07:55:12
阅读次数:
131
Kth Largest Element in an ArrayTotal Accepted:13165Total Submissions:48240My SubmissionsQuestionSolutionFind thekth largest element in an unsorted arr...
分类:
编程语言 时间:
2015-07-28 17:45:12
阅读次数:
126