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 hist...
分类:
其他好文 时间:
2014-07-21 14:18:36
阅读次数:
235
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...
分类:
其他好文 时间:
2014-07-21 10:04:43
阅读次数:
229
F - 最大子矩形
Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u
Submit
Status
Description
Given a two-dimensional array of positive and negative integers, a sub-rectangle is any ...
分类:
其他好文 时间:
2014-07-19 23:26:59
阅读次数:
236
?Problem A HDU 4450 水题,签到题水题。。没啥好说的。给大家签到用的。 1 #include 2 int main(){ 3 int n,a,ans; 4 while(scanf("%d",&n),n){ 5 ans = 0; 6 ...
分类:
其他好文 时间:
2014-07-19 13:33:32
阅读次数:
300
1506题意:给你连续的直方图(底边边长为1),求连续的矩阵面积。
对每个直方图,分别向左向右进行扩展。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define...
分类:
其他好文 时间:
2014-07-18 23:12:40
阅读次数:
290
Largest Rectangle in a HistogramTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10827Accepted Subm...
分类:
其他好文 时间:
2014-07-18 17:23:37
阅读次数:
228
POJ 1200题意:给定串s,串中不同字符数nc,所求子串长度n,求长度为n的不同的子串的个数分析:处理长度很短的字符串哈希,数据保证可以无冲突存储下来,利用hash思想快速查询以前便利的结果,关键在于优化搜索。code: 1 #include 2 #include 3 #include 4...
分类:
其他好文 时间:
2014-07-18 14:19:38
阅读次数:
361
DP简单题,以前用for循环写过,这次用状态递归写。感觉确实思路比以往清晰许多。 1 #include 2 #include 3 const int maxm=500+5,maxn=1000+5; 4 int d[maxm][maxn],a[maxm][maxn],n; 5 int trimax(i...
分类:
其他好文 时间:
2014-07-18 09:32:42
阅读次数:
155
/*BFS,注意马脚!马脚WA了一次,后来WA了N次,最后发现输入时候将军和马的位置搞反,更改后AC*/1 #include 2 #include 3 #include 5 using namespace std; 6 const int maxn=10000,maxm=25; 7 int vis....
分类:
其他好文 时间:
2014-07-18 09:29:15
阅读次数:
302
Problem Description
Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 <= N <= 100; 1 <= M <= 100) squares. Each square...
分类:
其他好文 时间:
2014-07-16 08:01:44
阅读次数:
291