码迷,mamicode.com
首页 >  
搜索关键字:csu 1547 rectangle    ( 2022个结果
csu1527: Bounty Hunter
Time Limit:5000MS     Memory Limit:131072KB     64bit IO Format:%lld & %llu Submit Status Practice CSU 1527 Description Input Output Sample Input...
分类:其他好文   时间:2015-03-19 22:05:33    阅读次数:103
Largest Rectangle in a Histogram (poj 2559 && hdu 1506 矩形系列 迭代法)
题意:给出n个矩形的高,问它们能组成的最大矩形的面积是多少。 思路:定义两个数组 l[i] 和 r[i] ,分别记录从 i 点能向左向右扩展的最大位置。若a[i]<=a[ l[i] - 1 ],则 l[i] = l[ l[i] - 1](如果i可以扩展到l[i]-1处,那么在计算i之前l[i]-1处的l[l[i]-1]已经计算出来了,就可以直接令l[i]=l[l[i]-1]了);同理,若 a[i]<=a[ r[i] - 1 ],则 r[i] = r[ r[i] - 1]。这样做充分利用了之前已经计算出来的数...
分类:其他好文   时间:2015-03-19 13:22:25    阅读次数:127
LeetCode-84 Largest Rectangle in Histogram
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-03-18 01:08:26    阅读次数:196
CSU 1529 Equator DP
队列优化DP Equator Time Limit: 5000MS   Memory Limit: 131072KB   64bit IO Format: %lld & %llu Submit Status Description Input Outp...
分类:其他好文   时间:2015-03-17 23:48:42    阅读次数:510
csu 1535: Pizza voting(思维)
http://acm.csu.edu.cn/OnlineJudge/showsource.php?id=97625#include#include#include#includeusing namespace std;int a[200000];int main(){ int n,m; int .....
分类:其他好文   时间:2015-03-15 22:47:15    阅读次数:139
csu 1530: Gold Rush(贪心)
http://acm.csu.edu.cn/OnlineJudge/showsource.php?id=97234#include#include#include#include#includeusing namespace std;int main(){ //freopen("output.tx....
分类:其他好文   时间:2015-03-15 22:37:21    阅读次数:155
Betsy Ross Problem
Matlab学习中的betsy ross问题。用matlab函数画1777年的美国国旗。五角星绘制部分是自己想出来的方法去画上的。具体代码参考如下。先是绘制矩形的函数1 function DrawRect(a,b,L,W,c)2 %Adda a Rectangle to the current wi...
分类:其他好文   时间:2015-03-15 16:45:22    阅读次数:166
[LeetCode] Maximal Rectangle
(Version 0.1)在做这道题之前,我刚刚做了Scramble String(http://www.cnblogs.com/icecreamdeqinw/p/4338731.html),所以Maximal Rectangle这道题拿来之后我的想法自然跟着惯性觉得肯定是可以用一个三维DP的解法做...
分类:其他好文   时间:2015-03-15 07:05:10    阅读次数:145
CSU 1105
A - 打怪升级 Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%lld & %llu Submit Status Practice CSU 1105 Appoint description:  System Crawler  (2015-03-10) Description ...
分类:其他好文   时间:2015-03-14 09:45:56    阅读次数:127
CSU 1110线段树
C - RMQ with Shifts Time Limit:1000MS     Memory Limit:131072KB     64bit IO Format:%lld & %llu Submit Status Practice CSU 1110 Appoint description:  System Crawler  (2015-03-10) Desc...
分类:其他好文   时间:2015-03-14 09:43:21    阅读次数:135
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!