[leetcode]Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area....
分类:
其他好文 时间:
2014-10-14 13:49:48
阅读次数:
148
code: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 class Solution { 8 public: 9 int largestRectangleArea(vector &he...
分类:
其他好文 时间:
2014-10-13 21:25:07
阅读次数:
221
1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 class Solution { 8 public: 9 int largestRectangleArea(vector &height)...
分类:
其他好文 时间:
2014-10-12 23:59:48
阅读次数:
173
An kind of interesting problem. Use an array arr[] to store how many gas are left if we travel from station i to station i+1, arr[i] = gas[i] - cost[i]. Then it becomes an variance of the maximal sub...
分类:
其他好文 时间:
2014-10-12 06:25:47
阅读次数:
210
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 histogram.
Above is a histogram where width o...
分类:
其他好文 时间:
2014-10-11 17:54:45
阅读次数:
147
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.
class Solution {
public:
int largestRectangleArea(int* height, int length) {
...
分类:
其他好文 时间:
2014-10-11 17:37:26
阅读次数:
156
{x:Null}:用于设置某属性值为Null,比如,其实就相当于,个人感觉这个纯属MS的多余设计另外要注意一个问题:运行时,如果点击矩形中间区域,会发现无法触发Rectangle_MouseLeftButtonUp事件,因为矩形Fill属性为null,没有填充,相当于透明,所以鼠标点击穿透矩形,点到...
分类:
其他好文 时间:
2014-10-11 15:10:55
阅读次数:
138
http://blog.csdn.net/yuxiaohen/article/details/17226971用法很奇葩记录一下,实测可以,用于弱化delegate与持有者的依赖delegate: Component { Rectangle { id:wrapper width: parent.wi...
分类:
其他好文 时间:
2014-10-10 16:31:23
阅读次数:
328
public partial class Form1 : Form{ private bool IsMouseDown = false; Rectangle MouseRect = Rectangle.Empty; public Form1() ...
分类:
其他好文 时间:
2014-10-09 01:46:57
阅读次数:
154
The maze was a rectangle with sizes N by M. There was a door in the maze. At the beginning, the door was closed and it would open at the T-th second f...
分类:
其他好文 时间:
2014-10-08 18:32:25
阅读次数:
205