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
题目链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1120解题报告:dp,用一个串去更新另一个串,递推方程是:if(b[i] > a[j]) m = max(m,dp[j]); else if(b[i] == a[j]) dp[j...
分类:
其他好文 时间:
2014-10-09 18:09:08
阅读次数:
175
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
题目链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1116解题报告:一个国家有n个城市,有m条路可以修,修每条路要一定的金币,现在这个国家只有K个金币,每个城市有一些人,要你求怎么修路使得总的费用在K的范围内,同时使得跟首都连接的城市的人口(...
分类:
其他好文 时间:
2014-10-07 18:29:43
阅读次数:
186
题目链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1113解题报告:输入两个字符串,第一个是原来的字典,第二个是新字典,字典中的元素的格式为一个关键字对应一个值,输入格式如下:{a:3,b:4,c:10,f:6}{a:3,c:5,d:10,e...
分类:
其他好文 时间:
2014-10-07 16:41:23
阅读次数:
251
1:shape总结
1):shape文件是放置在drawable文件下的。res/drawable/filename.xml.
2):shape类型:android:shape。一共有四种:rectangle,oval,line,ring。
3):corners标签:定义圆角。当且仅当控件类型位rectangle时才有作用。android:radiuse位圆角的半径。当然也...
分类:
移动开发 时间:
2014-10-06 18:07:10
阅读次数:
308