启动参数介绍 ttserver命令可以启动一个数据库实例。因为数据库已经实现了Tokyo Cabinet的抽象API,所以可以在启动的时候指定数据库的配置类型。支持的数据库类型有:内存hash数据库内存tree数据库hash数据库B+ tree数据库, 命令通过下面的格式来使用,‘dbname’制定数据库名,如果省略,则被视作内存hash数据库。ttserver [-host na...
分类:
其他好文 时间:
2014-07-27 23:49:49
阅读次数:
320
class Solution {private: vector res;public: vector generateTrees(int n) { res.clear(); res = dfs(1, n + 1); return res; ...
分类:
其他好文 时间:
2014-07-27 23:28:19
阅读次数:
195
This XML file does not appear to have any style information associated with it. The document tree is shown below.博客园_首页代码改变世界uuid:5de59c50-a92f-4447-9...
分类:
编程语言 时间:
2014-07-27 23:18:00
阅读次数:
794
可执行链接格式(Executable and Linking Format)最初是由UNIX系统实验室(UNIX System Laboratories,USL)开发并发布的,作为应用程序二进制接口(Application Binary Interface,ABI)的一部分。ELF标准的目的是为软件...
分类:
其他好文 时间:
2014-07-27 22:37:19
阅读次数:
327
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(...
分类:
其他好文 时间:
2014-07-27 22:03:49
阅读次数:
214
本文主要讨论二叉树相关算法的C语言实现,包括树的创建、三种方式遍历(递归与非递归)、输出叶结点、计算树的深度、树形输出、按层缩进输出、按层顺序输出、计算从根到指定结点的路径
分类:
其他好文 时间:
2014-07-27 22:02:59
阅读次数:
299
简单的线段树,多余的就不解释了。 1 #include 2 #include 3 4 using namespace std; 5 #define INF 0xffffff0 6 #define max(a,b) (a>b?a:b) 7 #define min(a,b) (a Tree[root]....
分类:
其他好文 时间:
2014-07-27 21:37:10
阅读次数:
216
题意: 树的前,中序遍历求后序遍历。基础题。code#include #include using namespace std;string sq, sh;int len;void make (int l, int r, int t, int w) { if (l > r || t > w) r.....
分类:
其他好文 时间:
2014-07-27 21:34:05
阅读次数:
195
UVA 10410 - Tree Reconstruction
题目链接
题意:给定一个树的dfs序列和bfs序列,求出这颗树
思路:拿dfs的序列,分成若干段,每一段相当一个子树,这样就可以利用bfs的序列去将dfs的序列分段,然后利用一个队列去存放每一段,不断求出子树即可。一开始以为parse tree一定是二叉树,原来不一定啊。
代码:
#include
#i...
分类:
其他好文 时间:
2014-07-27 11:49:23
阅读次数:
155
递归输出就行了
#include
using namespace std;
struct tree{
int dot;
string s;
}t[1020];
int si[1020],a[1020][1020];
void print(int x)
{
for(int i=0;i<=si[x]-1;i++)
{
for(int j=1;j<=t[...
分类:
其他好文 时间:
2014-07-27 11:48:53
阅读次数:
188