求一个01二位数组最大的矩阵,把它化为直角图再一行一行地算
class Solution{
public:
int maximalRectangle(vector > &martix){
int height[1000][1000];
int maxx = -1;
int row = martix.size();
if(row == 0) return 0;...
分类:
其他好文 时间:
2015-01-12 16:36:41
阅读次数:
167
测试为IE5+
1:在父元素的里面浮动元素的后面添加一个样式为clear:both;的元素;缺点是添加了无用的标签元素;
.clear{ clear:both; height:0px; font-size: 1px; line-height: 0px;overflow:hidden; }/* 清除浮动*/...
分类:
其他好文 时间:
2015-01-12 16:33:45
阅读次数:
130
浪去项目有个头图滑动横向滑动的需求,故写次demo
滑动跟随手指横向滑动
.spirit { /* 方块的class名称*/
position: absolute;
width: 50px;
height: 50px;
background-color: red;
}
...
分类:
其他好文 时间:
2015-01-12 16:30:12
阅读次数:
148
a, a:link {
cursor: pointer;
/*使用箭头 掠过显示小手 ie5只认: cursor: hand;*/
color: #666;
line-height: 24px;
text-decoration: none;
/*无下划线*/
white-space: nowrap;
/*无空格 不换行*/...
分类:
Web程序 时间:
2015-01-12 09:33:28
阅读次数:
159
题目:Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.代码:oj测试通过Runtime:178 ms 1 # Definition...
分类:
编程语言 时间:
2015-01-11 20:18:51
阅读次数:
235
参考一:From http://www.bitscn.com/school/HTMLCSS/201312/284207.html.clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hi...
分类:
Web程序 时间:
2015-01-11 17:23:20
阅读次数:
184
Convert Sorted List to Binary Search TreeGiven a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST....
分类:
其他好文 时间:
2015-01-11 14:46:32
阅读次数:
160
Convert Sorted Array to Binary Search TreeGiven an array where elements are sorted in ascending order, convert it to a height balanced BST.每次把中间元素当成根节...
分类:
其他好文 时间:
2015-01-11 12:10:19
阅读次数:
137
代码如下:
<?php
header('Content-type:image/jpeg');
$width=120;
$height=40;
$element=array('1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','m','n','o','p','q','r','s','...
分类:
Web程序 时间:
2015-01-11 09:40:39
阅读次数:
168
题目链接:POJ - 2774题目分析题目要求求出两个字符串的最长公共子串,使用后缀数组求解会十分容易。将两个字符串用特殊字符隔开再连接到一起,求出后缀数组。可以看出,最长公共子串就是两个字符串分别的一个后缀的 LCP ,并且这两个后缀在 SA 中一定是相邻的。那么他们的 LCP 就是 Height...
分类:
编程语言 时间:
2015-01-10 18:04:48
阅读次数:
197