http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2896#include #include #include struct node{ int u,v,w;}q[200001];int bin[500...
分类:
其他好文 时间:
2014-08-03 22:49:36
阅读次数:
172
各种配置在命令行状态下,多用crm进行 Global Cluster Options 这个类型是全局配置,主要包含下面两个: no-quorum-policy quorum的意思是最低法定人数,pacemaker能够继续工作所需要的最少的active的node的个数,这个数是(num of node...
分类:
其他好文 时间:
2014-08-03 22:48:46
阅读次数:
602
题目: 给定一个二叉树(假设是完全二叉树),把每个节点的next指针指向其右侧节点。
思路:首先想到的是,层序遍历树,在遍历的同时添加节点对右侧节点的指针。
另一种简洁的方法是采用递归来实现,间单直观。...
分类:
其他好文 时间:
2014-08-03 15:23:45
阅读次数:
246
一、活动图的组成元素Activity Diagram Element1、活动状态图(Activity)2、动作状态(Actions)3、动作状态约束(Action Constraints)4、动作流(Control Flow)5、开始节点(Initial Node)6、终止节点(Final Node...
分类:
其他好文 时间:
2014-08-03 15:02:45
阅读次数:
219
Consider an infinite full binary search tree (see the figure below), the numbers in the nodes are 1, 2, 3, .... In a subtree whose root node is X, we can get the minimum number in this subtree by repe...
分类:
其他好文 时间:
2014-08-03 12:49:15
阅读次数:
229
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
struct node{
char...
分类:
其他好文 时间:
2014-08-03 10:20:25
阅读次数:
216
# include
# include
# include
using namespace std;
int fa[10010];
struct node
{
int p;
int d;
};
struct node a[10010];
bool cmp(node a1,node a2)//利润从大到小
{
return a1.p>a2.p;
}
int find(int x)
{...
分类:
其他好文 时间:
2014-08-03 10:16:25
阅读次数:
208
问题:将二叉树的所有结点指向他的右边的一个结点分析:对于每一个结点来说,其操作都是一样的,除了他的左儿子指向右儿子外,其左儿子的全部右后辈均指向其右儿子的全部左后辈/** * Definition for binary tree with next pointer. * struct TreeLin...
分类:
其他好文 时间:
2014-08-03 10:12:05
阅读次数:
178
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
/**
* Definition for binary tree
...
分类:
其他好文 时间:
2014-08-02 23:32:04
阅读次数:
232
Node提供丰富的网络编程模块包括net、dgram、http和https,分别对应TCP、UDP、HTTP和HTTPS协议。...
分类:
Web程序 时间:
2014-08-02 23:31:34
阅读次数:
270