Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
For example, given n = 3, a solution set is:
"((()))", "(()())", "(())()", "()(())", "()()...
分类:
其他好文 时间:
2014-05-09 02:29:07
阅读次数:
302
1.bat 启动java main函数
1.将project导出JAR,过程中注意选择main class
2.新建bat,设置环境变量
3.1启动程序,如果想在黑窗口中打印数字,可以system.out,程序运行万
@echo off
@setlocal
set JAVA_HOME=jdk1.6.0_25
set PATH=%JAVA_HOME%\bin;%JAVA_HOME%\jre...
分类:
编程语言 时间:
2014-05-09 02:23:42
阅读次数:
394
sys.c 代码分析
setregid
/*
* This is done BSD-style, with no consideration of the saved gid, except
* that if you set the effective gid, it sets the saved gid too. This
* makes it possib...
分类:
系统相关 时间:
2014-05-09 02:13:12
阅读次数:
621
ZOJ Problem Set - 3780
Paint the Grid Again
Time Limit: 2 Seconds Memory Limit: 65536 KB
Leo has a grid with N × N cells. He wants to paint each cell with a specific color (either black ...
分类:
其他好文 时间:
2014-05-09 02:00:35
阅读次数:
506
迷宫问题可以看做是在“图”中求解:已知的两个节点是否连通,以及求某个连通的通路。可以通过图的深度优先遍历求解。
import java.util.HashSet;
import java.util.Set;
class Pos{
public int i;
public int j;
public Pos(int i,int j){
this.i=i;
this.j=j;
}...
分类:
其他好文 时间:
2014-05-09 01:52:20
阅读次数:
312
这道题是为数不多的感觉在读本科的时候见过的问题。人工构造的过程是怎样呢,后续遍历最后一个节点一定是整棵树的根节点,从中序遍历中查找到这个元素,就可以把树分为两颗子树,这个元素左侧的递归构造左子树,右侧的递归构造右子树,元素本身分配空间,作为根节点。
于set和map容器不同的是,vector容器不含find的成员函数,应该用stl的库函数,好在返回的也是迭代器,而vector的迭代器之间是可以做...
分类:
其他好文 时间:
2014-05-09 01:23:38
阅读次数:
275
HDU 4578
线段树区间更新
操作有:
区间所有数add(c)
区间所有数mul(c)
区间所有数set(c)
查询有:
区间所有数的p次方和(p>= 1 && p
关键是区间更新的三种操作的优先级的确定清楚
关键是:down和update中对区间的更新操作是一回事,可以写成函数方便编程
//#pragma warning (disable: 47...
分类:
其他好文 时间:
2014-05-09 01:08:38
阅读次数:
432
CREATE PROCEDURE dowhile()
BEGIN
DECLARE n int;
set n=1;
WHILE n
do
INSERT into hasindex(num) VALUES (n);
set n=n+1;
END WHILE;
END;
CALL dowhile();...
分类:
其他好文 时间:
2014-05-09 01:04:44
阅读次数:
293
Linux下安装Oracle11g1、 下载安装VMware Workstation v9.0.2 虚拟机软件,下载rhel-server-6.0-x86_64-dvd.iso安装Red Hat Enterprise Linux 6 64-bit操作系统到VMware中,安装时候添加Linux用户oracle。2、 在Vmware虚拟机中设置光驱属性为使用ISO映像文件linux.x64_11gR...
分类:
数据库 时间:
2014-05-09 00:59:35
阅读次数:
443
Exception Combiner允许系统设计者...
分类:
其他好文 时间:
2014-05-09 00:30:36
阅读次数:
488