题目:An image is represented by a binary matrix with0as a white pixel and1as a black pixel. The black pixels are connected, i.e., there is only one blac...
分类:
其他好文 时间:
2015-12-16 09:25:18
阅读次数:
956
1.http://msdn.itellyou.cn/下载Express版SQL Server2.快捷键win+R,进入CMD,解压文件,解压命令为 .exe /x /q3.CMD进入安装目录,输入setup.exe /q /ACTION=Install /FEATURES=SQL /INSTANC....
分类:
数据库 时间:
2015-12-03 00:47:53
阅读次数:
156
用的dfs,但是感觉这个方法应该不是最优的,否则这个题目不应该是hardpublic class Solution { int up = Integer.MAX_VALUE; int low = Integer.MIN_VALUE; int left = Integer.MAX_V...
分类:
其他好文 时间:
2015-12-01 08:25:51
阅读次数:
277
这种情况一般发生在“在静态方法里面使用内部类”测试代码:public class Test { public static void main(String[] args) { A a = new A(1); } class A { int x; public A() {} public A...
分类:
数据库 时间:
2015-11-19 13:13:35
阅读次数:
179
随机增量算法(a randomized incremental algorithm)#define sqr(x) ((x)*(x))#define EPS 1e-4struct P{ double x, y; P(double x, double y):x(x),y(y){} P(...
分类:
其他好文 时间:
2015-11-18 21:18:44
阅读次数:
224
Lua 中的函数是一阶类型值(first-class value),定义函数就象创建普通类型值一样(只不过函数类型值的数据主要是一条条指令而已),所以在函数体中仍然可以定义函数。假设函数f2定义在函数f1中,那么就称f2为f1的内嵌(inner)函数,f1为f2的外包(enclosing)函数,外包...
分类:
其他好文 时间:
2015-11-13 20:44:45
阅读次数:
282
最近在进行《Tingking in Java》这本书的学习,第二章练习题目中练习一遇到了问题,No enclosing instance of type test1 is accessible. Must qualify the allocation with an enclosing instan...
分类:
编程语言 时间:
2015-09-21 00:01:52
阅读次数:
218
初学者难免有点混淆java中instanceof和getClass()的作用, 下面就来一一讲解。 父类A: class A { } 子类B: class B extends A { } 构造对象 Object o1 = new A(); Object o2 = new B(); 一、instanc...
分类:
编程语言 时间:
2015-09-19 22:41:12
阅读次数:
291
题目链接:uva 12307 - Smallest Enclosing Rectangle
两组踵对点围成长方形,枚举出所有可行长方形维护最小值。
#include
#include
#include
#include
#include
#include
using namespace std;
typedef pair pii;
const double pi ...
分类:
其他好文 时间:
2015-08-27 15:28:58
阅读次数:
216
闭包:是由函数和其他相关的引用环境组合而成的实体。如果一个函数内部,对在外部作用域的变量进行引用,那么内部函数就被认为是闭包(closure)。A CLOSURE is a function object that remembers values in enclosing scopes regar...
分类:
编程语言 时间:
2015-08-26 17:40:53
阅读次数:
179