码迷,mamicode.com
首页 >  
搜索关键字:maximal rectangle    ( 1534个结果
css3激发想象/css3各种图形
http://www.cnblogs.com/wwcherish/archive/2012/09/18/2690336.htmlcss3激发想象/css3各种图形#square { width: 100px; height: 100px; background: red; }#rectangle {...
分类:Web程序   时间:2015-03-31 19:31:07    阅读次数:213
Android按钮shape形状资源代码实现
1、看文档Develop/API Guides/App Resources/Drawable/Shape Drawable 单词:corners : 角  ;  gradient :梯度; solid:固定的; stroke: 边框--可以做下划线        Rectangle : 矩形;dash :破折号 gap:间隙; 2、拷贝实例代码,文件命名(gradient_box.x...
分类:移动开发   时间:2015-03-31 11:01:09    阅读次数:459
湖南多校对抗赛(2015.03.28) A Rectangle
题意:给你一些最多宽为2 的木板,让你放在一个宽为二的盒子里面,问你这个盒子最短有多长。解题思路:DP,离中间最近的那个值。解题代码: 1 // File Name: a.cpp 2 // Author: darkdream 3 // Created Time: 2015年03月28日 星期六 12...
分类:其他好文   时间:2015-03-29 09:24:06    阅读次数:109
DP——To the Max
DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1 x 1 or greater locat...
分类:其他好文   时间:2015-03-28 21:34:43    阅读次数:127
【OpenGL基础篇】——使用面向对象方法封装OpenGL函数(三)——绘制矩形
今天实现的是在Window对象上绘制矩形,并且可以定制矩形的坐标、长宽、边框的大小的颜色、是否填充、以及填充时的颜色。 主要的思想就是先用线条绘制出边框,然后在里面绘制出矩形,再根据设定的是否填充的模式,选择此矩形的透明度,若显示,则透明度为1,;不显示,则透明度为0下面是Rectangle类的代码:/************************************************...
分类:其他好文   时间:2015-03-21 15:35:42    阅读次数:188
LeetCode – Refresh – Maximal Rectangle
This is the extension of Largest Rectangle in Histogram. We can just project 2D matrix to 1D array and compute it line by line. 1 class Solution { 2 p...
分类:其他好文   时间:2015-03-21 06:20:44    阅读次数:121
LeetCode – Refresh – Largest Rectangle in Histogram
Use two vector to record left and right indexes that can extend the blocks. 1 class Solution { 2 public: 3 int largestRectangleArea(vector &height...
分类:其他好文   时间:2015-03-20 08:02:31    阅读次数:126
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
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!